Nez.Portable/Math/Mathf.cs
/// <summary>
/// rounds value and returns it and the amount that was rounded
/// </summary>
/// <returns>The with remainder.</returns>
/// <param name="value">Value.</param>
/// <param name="roundedAmount">roundedAmount.</param>
rounds value and returns it and the amount that was rounded
rounds value and returns it and the amount that was rounded
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float roundWithRoundedAmount(float value, out float roundedAmount)
        {
            var rounded = Mathf.round(value);
            roundedAmount = value - (rounded * Mathf.round(value / rounded));
            return rounded;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static float roundWithRoundedAmount ( float value , out float roundedAmount ) { var rounded = Mathf . round ( value ) ; roundedAmount = value - ( rounded * Mathf . round ( value / rounded ) ) ; return rounded ; }
rounds value and returns it and the amount that was rounded
rounds value and returns it and the amount that was rounded
The with remainder.
The with remainder .
value
float
None
float
out
roundedAmount
None