Nez.Portable/Math/Mathf.cs
/// <summary>
/// if value >= threshold returns its sign else returns 0
/// </summary>
/// <returns>The threshold.</returns>
/// <param name="value">Value.</param>
/// <param name="threshold">Threshold.</param>
if value >= threshold returns its sign else returns 0
if value > = threshold returns its sign else returns 0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        static public float signThreshold(float value, float threshold)
        {
            if (Math.Abs(value) >= threshold)
                return Math.Sign(value);
            else
                return 0;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] static public float signThreshold ( float value , float threshold ) { if ( Math . Abs ( value ) >= threshold ) return Math . Sign ( value ) ; else return 0 ; }
if value >= threshold returns its sign else returns 0
if value > = threshold returns its sign else returns 0
None
value
float
None
threshold
float
None