code wiki / (root) / nx_f32_encode.nx

nx_f32_encode.nx

buildroot/runtime/nx_f32_encode.nx

2233 B43 linesdepth 2pulls 2 transitivereach 30 importersview sourcekind librarytopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_encode.nx -- the ENCODE half of f32: integer value -> IEEE-754 single bit pattern. nx_f32.nx has arithmetic + nx_fp32_q14 DECODES (f32->Q14), but nothing ENCODES a value to f32 bits -- the exact primitive an STL writer needs to emit mesh vertices (then nx_le_write_u32 the bits). This fills that gap (no duplicate -- verified nx_f32/nx_fp32_q14 lack it). license_tier: ORIGINAL.

dependencies 1 imports · 5 importers

nx_syscalls.nx nx_f32_encode.nx nx_f32_encode_test.nx nx_f32_q14_encode_test.nx nx_stl_write.nx nx_stl_write_mesh_test.nx nx_stl_write_test.nx

imports: nx_syscalls.nx

imported by: nx_f32_encode_test.nxnx_f32_q14_encode_test.nxnx_stl_write.nxnx_stl_write_mesh_test.nxnx_stl_write_test.nx

structs

none

consts

8const K_MAGIC_8388607: i64 = 8388607

functions

11func f32_from_i64(v: i64) -> i64
35func f32_from_q14(q14: i64) -> i64