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

classic_ordering_depth3_from_sum

Function classic_ordering_depth3_from_sum 

Source
pub fn classic_ordering_depth3_from_sum(sum: u32) -> u16
Expand description

Scale a three-depth sum into the classic 2,048-slot OTZ domain.

This is exactly (sum * 0x155) >> 12. The MIPS sequence factors 0x155 as 5 * 17 * 4 + 1, avoiding two shifts and additions emitted for the flat constant multiply on MIPS I.