Function qm31_coordinates_to_packed_reduced

Source
pub fn qm31_coordinates_to_packed_reduced(coordinates: [u64; 4]) -> Felt252
Expand description

QM31 utility function, used specifically for Stwo. QM31 operations are to be relocated into https://github.com/lambdaclass/lambdaworks. Reduces four u64 coordinates and packs them into a single Felt252. STWO_PRIME fits in 36 bits, hence each coordinate can be represented by 36 bits and a QM31 element can be stored in the first 144 bits of a Felt252.