コード例 #1
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public Vec2(Vec2 vec)
 {
     this.X = vec.X;
     this.Y = vec.Y;
 }
コード例 #2
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public bool Equals(Vec2 other)
 {
     return(X.Equals(other.X) && Y.Equals(other.Y));
 }
コード例 #3
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public static double DistanceSq(Vec2 a, Vec2 b)
 {
     return((a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y));
 }
コード例 #4
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public static Vec2 Cross(double s, Vec2 a)
 {
     a.X *= s;
     a.Y *= -s;
     return(a);
 }
コード例 #5
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public static Vec2 Cross(Vec2 a, double s)
 {
     a.X *= -s;
     a.Y *= s;
     return(a);
 }
コード例 #6
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public static double Cross(Vec2 a, Vec2 b)
 {
     return(a.X * b.Y - a.Y * b.X);
 }
コード例 #7
0
ファイル: Vec2.cs プロジェクト: professorlust/TouhouCV
 public static double Dot(Vec2 a, Vec2 b)
 {
     return(a.X * b.X + a.Y * b.Y);
 }