Glade Reference
A Vector class represents a direction.
Creates a Vector object v. The Vector is initialised to (0.0, 0.0) by default.
Creates a Vector v, initialised with the values x and y.
Creates a Vector v, initialised with the difference between x1 and x2, and the difference between y1 and y2.
Set the Vector X value.
Set the Vector Y value.
Get the X component of the Vector v.
Get the Y component of the Vector v.
Adds the two Vectors.
Subtracts the two Vectors.
Returns a Vector multiplied by a scalar.
Returns a Vector divided by a scalar.
Returns the dot product of the vector with the other vector.
Returns the cross product of the vector with the other vector.
Returns the length of the vector.
Returns the unit vector, i.e. its components divided by the vector length.
Returns the normal vector, i.e. a vector perpendicular to this vector.
A macro returning the dot product of the two vectors u and v. Being a macro u and v can be any numeric type.
A macro returning the cross product of the two vectors u and v. Being a macro u and v can be any numeric type.
A macro returning the length of the vector u. Being a macro u can be any numeric type.
A macro returning the norm of the difference of the vectors u and v. Being a macro u and v can be any numeric type.
Copyright © Peardrop Design 2024.