diff --git a/inc/hgl/math/HalfFloat.h b/inc/hgl/math/HalfFloat.h index 8670a2a..4d77d6e 100644 --- a/inc/hgl/math/HalfFloat.h +++ b/inc/hgl/math/HalfFloat.h @@ -54,16 +54,6 @@ namespace hgl */ void Float32toFloat16(half_float *output,const float *input,const uint count); - /** - * 快速版float32转float16处理 - */ - inline const half_float float2half(const float &f) - { - const uint32 x = *((uint32 *)&f); - - return ((x>>16)&0x8000)|((((x&0x7f800000)-0x38000000)>>13)&0x7c00)|((x>>13)&0x03ff); - } - inline const float half2float(const half_float &hf) { union @@ -87,16 +77,6 @@ namespace hgl } } - inline void float_to_half(half_float *target,const float *source,uint32 count) - { - while (count--) - { - *target = float2half(*source); - ++target; - ++source; - } - } - inline void half2u16(uint16 *output,const half_float *input,const uint count) { union