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

SIN_TABLE

Constant SIN_TABLE 

Source
pub const SIN_TABLE: [i16; 256];
Expand description

256-entry sine table, Q1.12 fixed-point (one revolution).

Index = (angle_q12 >> 4) & 0xFF, where angle_q12 is a u16 in [0, 4096) mapping linearly to [0°, 360°). sin_q12 interpolates using the low 4 angle bits. Values are i16 in [-4096, 4096].