fn from_felt(val: felt252) -> T;
Creates a new fixed point instance from a felt252 value.
val
(felt252
) -felt252
value to convert in fixed point.
A new fixed point instance.
use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait};
fn from_felt_example() -> FP16x16 {
// We can call `from_felt` function as follows .
FixedTrait::from_felt(190054)
}
>>> {mag: 190054, sign: false} // = 2.9