pub fn signed_felt(felt: Felt252) -> BigInt
Converts Felt252 into a BigInt number in the range: (- FIELD / 2, FIELD / 2).
Felt252
BigInt
(- FIELD / 2, FIELD / 2)
let positive = Felt252::from(5); assert_eq!(signed_felt(positive), BigInt::from(5)); let negative = Felt252::MAX; assert_eq!(signed_felt(negative), BigInt::from(-1));