WinRTXamlToolkit.Controls.DataVisualization.Charting.LinearAxis.AlignToInterval C# (CSharp) 메소드

AlignToInterval() 개인적인 정적인 메소드

Aligns a value to the provided interval value. The aligned value should always be smaller than or equal to than the provided value.
private static AlignToInterval ( double value, double interval ) : double
value double The value to align to the interval.
interval double The interval to align to.
리턴 double
        private static double AlignToInterval(double value, double interval)
        {
            double typedInterval = (double)interval;
            double typedValue = (double)value;
            return ValueHelper.RemoveNoiseFromDoubleMath(ValueHelper.RemoveNoiseFromDoubleMath(Math.Floor(typedValue / typedInterval)) * typedInterval);
        }