1 #include "../MathBuildConfig.h"2 #include "[MathNamespace.h]"3 #include "../MathGeoLibFwd.h"4 5 #pragma once6 7 [MATH_BEGIN_NAMESPACE]8 9 10 union [FloatIntReinterpret]11 {12 float [f];13 u32 [i];14 };15 16 union [DoubleU64Reinterpret]17 {18 double [d];19 [u64] [i];20 };21 22 23 [FORCE_INLINE] u32 [ReinterpretAsU32](float f)24 {25 [FloatIntReinterpret] fi;26 fi.[f] = f;27 return fi.[i];28 }29 30 [FORCE_INLINE] [u64] [ReinterpretAsU64](double [d])31 {32 [DoubleU64Reinterpret] di;33 di.[d] = [d];34 return di.[i];35 }36 37 38 [FORCE_INLINE] float [ReinterpretAsFloat](u32 i)39 {40 [FloatIntReinterpret] fi;41 fi.[i] = i;42 return fi.[f];43 }44 45 [FORCE_INLINE] double [ReinterpretAsDouble]([u64] i)46 {47 [DoubleU64Reinterpret] di;48 di.[i] = i;49 return di.[d];50 }51 52 [MATH_END_NAMESPACE]; Go back to previous page