Exemple #1
0
 /// <summary>
 /// Copying constructor
 /// </summary>
 /// <param name="copyVector">Copying vector</param>
 public GlVectorR2(GlVectorR2 copyVector) :
     this(copyVector == null ? 0 : copyVector.dX,
          copyVector == null ? 0 : copyVector.dY)
 {
 }
Exemple #2
0
 /// <returns>If vectors are equal</returns>
 public static bool Equals(GlVectorR2 V1, GlVectorR2 V2)
 {
     return((V1 == null || V2 == null) ? false : (V1.dX == V2.dX && V1.dY == V2.dY));
 }
Exemple #3
0
 /// <returns>If vectors are perpendicular</returns>
 public static bool isPerpendicular(GlVectorR2 V1, GlVectorR2 V2)
 {
     return((V1 == null || V2 == null) ? false : (Math.Abs(V1 * V2) < FAULT));
 }
Exemple #4
0
 public override bool Equals(object obj)
 {
     return(obj.GetType().Equals(this.GetType()) && GlVectorR2.Equals(obj as GlVectorR2, this));
 }
Exemple #5
0
        //////////////TRANSFORM_METHODS////////////////
        ///////////////////////////////////////////////
        ///////////////ADDITIONAL_METHODS//////////////

        /// <returns>If vectors are collinear</returns>
        public static bool isParallel(GlVectorR2 V1, GlVectorR2 V2)
        {
            return((V1 == null || V2 == null) ? false : (Math.Abs(V1 ^ V2) < FAULT));
        }