tests/Colourful.Tests/Comparers/DoublePrecisionComparer.cs
/// <summary>
/// Floors number and preserves specific numer of decimal places.
/// </summary>
Floors number and preserves specific numer of decimal places.
Floors number and preserves specific numer of decimal places .
private static double FloorWithPrecision(double input, int decimalPlaces)
        {
            var power = Math.Pow(x: 10, decimalPlaces);
            var output = Math.Floor(input * power) / power;
            return output;
        }
private static double FloorWithPrecision ( double input , int decimalPlaces ) { var power = Math . Pow ( x : 10 , decimalPlaces ) ; var output = Math . Floor ( input * power ) / power ; return output ; }
Floors number and preserves specific numer of decimal places.
Floors number and preserves specific numer of decimal places .
input
double
decimalPlaces
int