}
+// Create vector from angle + length (2D; z is set to zero)
+void Vector::SetAngleAndLength(double angle, double length)
+{
+ x = cos(angle) * length;
+ y = sin(angle) * length;
+ z = 0;
+}
+
+
Vector Vector::operator=(Vector const v)
{
x = v.x, y = v.y, z = v.z;
// (Not sure which is head or tail, or which hand the normal lies)
// [v1 should be the tail, v2 should be the head, in which case the normal should
// rotate anti-clockwise.]
-///*static*/ Vector Vector::Normal(Vector v1, Vector v2)
/*static*/ Vector Vector::Normal(Vector tail, Vector head)
{
-// Vector v = (v1 - v2).Unit();
Vector v = (head - tail).Unit();
return Vector(-v.y, v.x);
}