diff options
Diffstat (limited to 'Runtime/Math/FloatConversion.h')
-rw-r--r-- | Runtime/Math/FloatConversion.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Runtime/Math/FloatConversion.h b/Runtime/Math/FloatConversion.h index e5c0f23..96a4d1d 100644 --- a/Runtime/Math/FloatConversion.h +++ b/Runtime/Math/FloatConversion.h @@ -189,7 +189,7 @@ inline double Roundf(double f) } -/// Fast conversion of float [0...1] to 0 ... 65535 +// Fast conversion of float [0...1] to 0 ... 65535 inline int NormalizedToWord(float f) { f = FloatMax(f, 0.0F); @@ -197,14 +197,14 @@ inline int NormalizedToWord(float f) return RoundfToIntPos(f * 65535.0f); } -/// Fast conversion of float [0...1] to 0 ... 65535 +// Fast conversion of float [0...1] to 0 ... 65535 inline float WordToNormalized(int p) { AssertIf(p < 0 || p > 65535); return (float)p / 65535.0F; } -/// Fast conversion of float [0...1] to 0 ... 255 +// Fast conversion of float [0...1] to 0 ... 255 inline int NormalizedToByte(float f) { f = FloatMax(f, 0.0F); @@ -212,7 +212,7 @@ inline int NormalizedToByte(float f) return RoundfToIntPos(f * 255.0f); } -/// Fast conversion of float [0...1] to 0 ... 255 +// Fast conversion of float [0...1] to 0 ... 255 inline float ByteToNormalized(int p) { AssertIf(p < 0 || p > 255); @@ -249,7 +249,7 @@ inline bool CompareApproximately(float f0, float f1, float epsilon = 0.000001F) return dist < epsilon; } -/// CopySignf () returns x with its sign changed to y's. +// CopySignf () returns x with its sign changed to y's. inline float CopySignf(float x, float y) { union @@ -389,17 +389,17 @@ inline bool IsFinite(const double& value) inline float InvSqrt(float p) { return 1.0F / sqrt(p); } inline float Sqrt(float p) { return sqrt(p); } -/// - Almost highest precision sqrt -/// - Returns 0 if value is 0 or -1 -/// inline float FastSqrt (float value) +// - Almost highest precision sqrt +// - Returns 0 if value is 0 or -1 +// inline float FastSqrt (float value) -/// - Almost highest precision inv sqrt -/// - if value == 0 or -0 it returns 0. -/// inline float FastInvSqrt (float value) +// - Almost highest precision inv sqrt +// - if value == 0 or -0 it returns 0. +// inline float FastInvSqrt (float value) -/// - Low precision inv sqrt approximately -/// - if value == 0 or -0 it returns nan or undefined -/// inline float FastestInvSqrt (float value) +// - Low precision inv sqrt approximately +// - if value == 0 or -0 it returns nan or undefined +// inline float FastestInvSqrt (float value) #if defined(__ppc__) || defined(SN_TARGET_PS3) @@ -426,8 +426,8 @@ inline float FastSqrt(float x) return x; } #else -/// - Accurate to 1 bit precision -/// - returns zero if x is zero +// - Accurate to 1 bit precision +// - returns zero if x is zero inline float FastSqrt(float x) { const float half = 0.5; @@ -459,8 +459,8 @@ inline float FastSqrt(float x) } #endif -/// - Accurate to 1 bit precision -/// - returns zero if f is zero +// - Accurate to 1 bit precision +// - returns zero if f is zero inline float FastInvSqrt(float f) { float result; @@ -486,7 +486,7 @@ inline float FastInvSqrt(float f) return result; } -/// Fast inverse sqrt function +// Fast inverse sqrt function inline float FastestInvSqrt(float value) { #if defined (__ppc__) && (defined (__MWERKS__) || defined(SN_TARGET_PS3)) |