Esempio n. 1
0
 private double PrepareLength(double length)
 {
     if (!FloatingPointArithmetic.IsFiniteDouble(length))
     {
         return(0.0);
     }
     return(Math.Max(length, 0.0));
 }
Esempio n. 2
0
 private bool IsMatrixValidForTransform(Matrix matrix)
 {
     if (FloatingPointArithmetic.IsFiniteDouble(matrix.M11) && FloatingPointArithmetic.IsFiniteDouble(matrix.M12) && (FloatingPointArithmetic.IsFiniteDouble(matrix.M21) && FloatingPointArithmetic.IsFiniteDouble(matrix.M22)) && FloatingPointArithmetic.IsFiniteDouble(matrix.OffsetX))
     {
         return(FloatingPointArithmetic.IsFiniteDouble(matrix.OffsetY));
     }
     return(false);
 }
Esempio n. 3
0
 private double PreparePosition(double pos)
 {
     if (!FloatingPointArithmetic.IsFiniteDouble(pos))
     {
         return(0.0);
     }
     return(pos);
 }