code wiki / _hdl_build / nx_viz_trig.nx

nx_viz_trig.nx

buildroot/runtime/_hdl_build/nx_viz_trig.nx

1231 B30 linesdepth 2pulls 2 transitivereach 20 importersview sourcekind tooltopic viz
docsdependenciesstructsconstsfunctions

about

nx_viz_trig.nx -- the TRIG layer of the sovereign Nishi viz library (hardware-rung-up: pure INTEGER sin/cos, no FPU, no lookup table). Bhaskara I's sine approximation: sin(d deg) ~= 4d(180-d) / (40500 - d(180-d)), accurate to ~0.16% -- exact at 0/30/90/150/180. Output scaled by 10000 (sin(90)=10000). Range-reduced to [0,360). Unlocks arc/pie shapes + radial/force layouts. license_tier: ORIGINAL

dependencies 1 imports · 7 importers

nx_syscalls.nx nx_viz_trig.nx nx_viz_force.nx nx_viz_force_gate.nx nx_viz_geo.nx nx_viz_pack.nx nx_viz_pack_gate.nx nx_viz_shape.nx nx_viz_trig_gate.nx

imports: nx_syscalls.nx

imported by: nx_viz_force.nxnx_viz_force_gate.nxnx_viz_geo.nxnx_viz_pack.nxnx_viz_pack_gate.nxnx_viz_shape.nxnx_viz_trig_gate.nx

structs

none

consts

6const K_MAGIC_40500: i64 = 40500
7const K_MAGIC_40000: i64 = 40000

functions

10func vs_sin(deg: i64) -> i64
21func vs_cos(deg: i64) -> i64 { return vs_sin(deg + 90) }
23func vs_isqrt(n: i64) -> i64
30func main() -> i64 { return 0 }