public int LengthSq( Vector2I b ) { return ( this.x - b.x ) * ( this.x - b.x ) + ( this.y - b.y ) * ( this.y - b.y ); }
public Vector2F( Vector2I a ) { this.x = (float)a.x; this.y = (float)a.y; }
public bool IsParallel( Vector2I b ) { return this.cross( b ) == 0; }
public bool IsVertical( Vector2I b ) { return this.dot( b ) == 0; }
public bool IsInCircle( Vector2I centerPos, float radius ) { return IsInCircle( new Vector2F( centerPos.x, centerPos.y ), radius ); }
public bool IsObtuse( Vector2I b ) { return this.cross( b ) < 0; }
public bool IsAcute( Vector2I b ) { return this.cross( b ) > 0; }
public int dot( Vector2I v ) { return this.x * v.x + this.y * v.y; }
public int cross( Vector2I v ) { return this.x * v.y - this.y * v.x; }
public static void Swap( ref Vector2I a, ref Vector2I b ) { Vector2I hoge = a; a = b; b = hoge; }
public bool IsInCircle( Vector2I a, float radius ) { return IsInCircle( new Vector2F( a.x, a.y ), radius ); }