pathfinder-crypto 0.22.5

Cryptographic primitives used by Pathfinder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::MontFelt;

impl MontFelt {
    #[inline(always)]
    pub const fn is_odd(&self) -> bool {
        self.0[0] & 1 == 1
    }

    #[inline(always)]
    pub const fn is_even(&self) -> bool {
        self.0[0] & 1 == 0
    }
}