Beispiel #1
0
 public AffineFunction   SetYIntercept(double value)
 {
     if (DoubleEx.AreClose(this.YIntercept, value))
     {
         return(this);
     }
     return(new AffineFunction(this.Slope, value));
 }
Beispiel #2
0
        protected IMouseWheelShaft GetMotionShaftAuto(MouseWheel wheel, IMouseWheelTransferCase transferCase,
                                                      int debouncingCellCount)
        {
            var resolution = wheel.Resolution;

            if (DoubleEx.AreClose(resolution, (int)resolution))
            {
                return(transferCase[debouncingCellCount]); // the most granular debouncing
            }
            return(transferCase[0]);                       // no debouncing if wheel resolution not integral
        }
 public bool Equals(MouseWheelScrollIncrement other)
 {
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (other == null)
     {
         return(false);
     }
     return(ScaleType == other.ScaleType && DoubleEx.AreClose(Increment, other.Increment) && Orientation == other.Orientation);
 }