Math Operations in Move
Move supports familiar math operations with integer-based precision, requiring typecasting for calculations between different unsigned integer types.
Math in Move
module 0xcafe::Dinosaur_nest {
struct DinosaurGendna has key {
Gendna_digits: u64,
Gendna_modulus: u64,
}
fun init_module(cafe_signer: &signer) {
move_to(cafe_signer, DinosaurGendna {
Gendna_digits: 10,
Gendna_modulus: 10 ^ 10,
});
}
}