public double CrossProduct(FreeVector other) { Vector v = new Vector(_p.X, _p.Y); Vector u = new Vector(other._p.X, other._p.Y); //return this.X * other.Y - this.Y * other.X; return(Vector.CrossProduct(v, u)); }
public bool IsApproxHorizontal() { //double angle = Math.Atan(_p.Y / _p.X); //return Math.Abs(angle) <= eps_deg; FreeVector v = this; v.Length = 1; return(Math.Abs(_p.Y) <= 5); }
public bool IsApproxVertical() { //double angle = Math.Atan(_p.Y / _p.X); //return Math.Abs(angle - (Math.PI / 2)) <= (eps_deg * 1.5); FreeVector v = this; v.Length = 1; return(Math.Abs(_p.X) <= 5); }
public Direction GetDirection(FreeVector v) { return(this.CrossProduct(v) >= 0 ? Direction.Anticlockwise : Direction.Clockwise); }