Float16 module

vector2_float16

procedure · 1 overloadSource

Converts a Math.Vector2 to half precision, rounding each component as float_to_half_fast3 does.

ExampleOpen in playground ↗
#import "Math";
h := vector2_float16(xy(0.5, -4));
v := vector2_float32(h);
assert(v.x == 0.5 && v.y == -4);
vector2_float16 :: (v: Vector2) -> Vector2_Float16

Parameters

Returns

See also