コード例 #1
0
ファイル: Utilities.cs プロジェクト: wcatykid/GeoShader
 public static bool IsInteger(double x)
 {
     return(Utilities.CompareValues(x, (int)x));
 }
コード例 #2
0
ファイル: Utilities.cs プロジェクト: wcatykid/GeoShader
 //
 // Given a list of grounded clauses, add a new value which is structurally unique.
 //
 public static bool HasStructurally <T>(List <T> list, T t) where T : ConcreteAST.GroundedClause
 {
     return(Utilities.StructuralIndex <T>(list, t) != -1);
 }
コード例 #3
0
ファイル: Utilities.cs プロジェクト: wcatykid/GeoShader
 // -1 is an error
 public static int IntegerRatio(double x, double y)
 {
     return(Utilities.CompareValues(x / y, Math.Floor(x / y)) ? (int)Math.Floor(x / y) : -1);
 }