目次

Vector2

二次元ベクトルを扱うクラス

voidVector2(void)
voidVector2(double)
voidVector2(double,double)
thisadd(double)
thisadd(Vector2)
doubleangle(Vector2)
Vector2clone(void)
thiscross(Vector2)
doubledistance(void)
thisdiv(double)
thisdiv(Vector2)
doubledot(void)
boolequals(Vector2)
doublelength(void)
thismul(double)
thismul(Vector2)
doublenorm(void)
thisnormalize(void)
thissub(double)
thissub(Vector2)

Property

double x;
double y;

Function


Vector2(void)

Vector2(double)

Vector2(double,double)

//example
var v0 = Vector2();
var v1 = Vector2(1.0);
var v2 = Vector2(0.0,1.0);

add(double)

return this


add(Vector2)

return this


angle(Vector2)

return double


clone(void)

return Vector2


cross(Vector2)

return this


distance(Vector2)

return double


div(double)

return this


div(Vector2)

return this


dot(Vector2)

return double


equals(Vector2)

return bool


length(void)

return double


mul(double)

return this


mul(Vector2)

return this


norm(void)

return double


normalize(void)

return this


sub(double)

return this


sub(Vector2)

return this