/** * <code>normalize</code> returns the unit vector of this vector. * * @return unit vector of this vector. */public Vector2f normalize() {
float length = length();
if (length != 0) {
returndivide(length);
}
returndivide(1);
}
/** * <code>normalize</code> returns the unit vector of this vector. * * @return unit vector of this vector. */public Vector2f normalize() {
float length = length();
if (length != 0) {
returndivide(length);
}
returndivide(1);
}
/** * <code>normalize</code> returns the unit vector of this vector. * * @return unit vector of this vector. */public Vector2f normalize() {
float length = length();
if (length != 0) {
returndivide(length);
}
returndivide(1);
}