static private RemoveNoiseFromDoubleMath ( double value ) : double | ||
value | double | The value. |
리턴 | double |
/// <summary> /// Aligns a value to the provided interval value. The aligned value /// should always be smaller than or equal to than the provided value. /// </summary> /// <param name="value">The value to align to the interval.</param> /// <param name="interval">The interval to align to.</param> /// <returns>The aligned value.</returns> 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)); }