Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

isqrt_i32

Function isqrt_i32 

Source
pub fn isqrt_i32(value: i32) -> i32
Expand description

Integer square root: exact floor(sqrt(value)) for positive inputs, 0 for zero and negative inputs.

Digit-by-digit (binary restoring) method: shifts and adds only, no multiplies or divides, so it is cheap on the R3000.