Nez.Portable/Math/Mathf.cs
/// <summary>
/// ping-pongs t so that it is never larger than length and never smaller than 0
/// </summary>
/// <returns>The pong.</returns>
/// <param name="t">T.</param>
/// <param name="length">Length.</param>
ping-pongs t so that it is never larger than length and never smaller than 0
ping - pongs t so that it is never larger than length and never smaller than 0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float pingPong(float t, float length)
        {
            t = Mathf.repeat(t, length * 2f);
            return length - Math.Abs(t - length);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static float pingPong ( float t , float length ) { t = Mathf . repeat ( t , length * 2f ) ; return length - Math . Abs ( t - length ) ; }
ping-pongs t so that it is never larger than length and never smaller than 0
ping - pongs t so that it is never larger than length and never smaller than 0
None
t
float
None
length
float
None