target/generated-sources/template/com/flowpowered/math/GenericMath.java
public static Vector2d normalizeSafe(Vector2d v) {
        try {
            return v.normalize();
        } catch (ArithmeticException ex) {
            return Vector2d.ZERO;
        }
    }
public static Vector2d normalizeSafe(Vector2d v) {
        try {
            return v.normalize();
        } catch (ArithmeticException ex) {
            return Vector2d.ZERO;
        }
    }
Attempts to normalize a vector. If this fails, the method catches the exception and return a zero vector of the same dimension instead.

@param v The vector to attempt to normalize
@return The normalized vector, or the zero vector if it couldn't be normalized.