예제 #1
0
 public Double2 RotScale(Double2 u) => new Double2(X * u.X - Y * u.Y, X * u.Y + Y * u.X);
예제 #2
0
 public double DistanceTo(Double2 o) => (o - this).Length;
예제 #3
0
 public double DistanceSquaredTo(Double2 o) => (o - this).LengthSquared;
예제 #4
0
 public double Cross(Double2 o) => X * o.Y - Y * o.X;
예제 #5
0
 public double Dot(Double2 o) => X * o.X + Y * o.Y;
예제 #6
0
 public bool ContainsPoint(Double2 v) => X <= v.X && Y <= v.Y && X + Width >= v.X && Y + Height >= v.Y;