Function signed_felt
Source pub fn signed_felt(felt: Felt252) -> BigInt
Expand description
Converts Felt252 into a BigInt number in the range: (- FIELD / 2, FIELD / 2).
ยงExamples
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));