Converts a Math.Vector4 to half precision, rounding each component as float_to_half_fast3 does.
#import "Math";
h := vector4_float16(xyzw(1, 2, 3, 70000));
assert(float16_to_float32(h.w) > 1e30); // 70000 overflows to infinity
assert(float16_to_float32(h.y) == 2);vector4_float16 :: (v: Vector4) -> Vector4_Float16
Parameters
- v: Vector4