예제 #1
0
 public int LengthSq( Vector2I b )
 {
     return ( this.x - b.x ) * ( this.x - b.x ) + ( this.y - b.y ) * ( this.y - b.y );
 }
예제 #2
0
 public Vector2F( Vector2I a )
 {
     this.x = (float)a.x;
     this.y = (float)a.y;
 }
예제 #3
0
 public bool IsParallel( Vector2I b )
 {
     return this.cross( b ) == 0;
 }
예제 #4
0
 public bool IsVertical( Vector2I b )
 {
     return this.dot( b ) == 0;
 }
예제 #5
0
 public bool IsInCircle( Vector2I centerPos, float radius )
 {
     return IsInCircle( new Vector2F( centerPos.x, centerPos.y ), radius );
 }
예제 #6
0
 public bool IsObtuse( Vector2I b )
 {
     return this.cross( b ) < 0;
 }
예제 #7
0
 public bool IsAcute( Vector2I b )
 {
     return this.cross( b ) > 0;
 }
예제 #8
0
 public int dot( Vector2I v )
 {
     return this.x * v.x + this.y * v.y;
 }
예제 #9
0
 public int cross( Vector2I v )
 {
     return this.x * v.y - this.y * v.x;
 }
예제 #10
0
 public static void Swap( ref Vector2I a, ref Vector2I b )
 {
     Vector2I hoge = a;
     a = b;
     b = hoge;
 }
예제 #11
0
 public bool IsInCircle( Vector2I a, float radius )
 {
     return IsInCircle( new Vector2F( a.x, a.y ), radius );
 }