core/math/fixed
math_fixed
Types
11Fixed
Fixed :: struct {}SourceFixed13_3
Fixed13_3 :: Fixed(i16, 3)SourceFixed16_16
Fixed16_16 :: Fixed(i32, 16)SourceFixed26_6
Fixed26_6 :: Fixed(i32, 6)SourceFixed32_32
Fixed32_32 :: Fixed(i64, 32)SourceFixed4_4
Fixed4_4 :: Fixed(i8, 4)SourceFixed52_12
Fixed52_12 :: Fixed(i64, 12)SourceFixed5_3
Fixed5_3 :: Fixed(i8, 3)SourceFixed6_2
Fixed6_2 :: Fixed(i8, 2)SourceFixed7_1
Fixed7_1 :: Fixed(i8, 1)SourceFixed8_8
Fixed8_8 :: Fixed(i16, 8)SourceProcedures
14add
add :: proc(x: T, y: T) -> (T)Sourceceil
ceil :: proc(x: T) -> (Backing)Sourcediv
div :: proc(x: T, y: T) -> (z: T)Sourcediv_sat
div_sat :: proc(x: T, y: T) -> (z: T)Sourcefloor
floor :: proc(x: T) -> (Backing)Sourceinit_from_f64
init_from_f64 :: proc(x: ^T, val: f64)Sourceinit_from_parts
init_from_parts :: proc(x: ^T, integer: Backing, fraction: Backing)Sourcemul
mul :: proc(x: T, y: T) -> (z: T)Sourcemul_sat
mul_sat :: proc(x: T, y: T) -> (z: T)Sourceround
round :: proc(x: T) -> (Backing)Sourcesub
sub :: proc(x: T, y: T) -> (T)Sourceto_f64
to_f64 :: proc(x: T) -> (f64)Sourceto_string
to_string :: proc(x: T, allocator: mem.Allocator = context.allocator) -> (string)Sourcewrite
write :: proc(dst: []u8, x: T) -> (string)Source