Add new **Noise** library for C++/C#/VisualScript/HLSL utilities
This commit is contained in:
@@ -172,6 +172,11 @@ namespace Math
|
||||
return modff(a, b);
|
||||
}
|
||||
|
||||
static FORCE_INLINE float Frac(float value)
|
||||
{
|
||||
return value - Floor(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns signed fractional part of a float.
|
||||
/// </summary>
|
||||
|
||||
@@ -130,6 +130,11 @@ namespace Math
|
||||
return modf(a, b);
|
||||
}
|
||||
|
||||
static FORCE_INLINE double Frac(double value)
|
||||
{
|
||||
return value - Floor(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns signed fractional part of a double.
|
||||
/// </summary>
|
||||
|
||||
@@ -469,7 +469,7 @@ public:
|
||||
|
||||
static Vector2Base Frac(const Vector2Base& v)
|
||||
{
|
||||
return Vector3(v.X - (int32)v.X, v.Y - (int32)v.Y);
|
||||
return Vector2Base(v.X - (int32)v.X, v.Y - (int32)v.Y);
|
||||
}
|
||||
|
||||
static Vector2Base Round(const Vector2Base& v)
|
||||
|
||||
Reference in New Issue
Block a user