target/generated-sources/template/com/flowpowered/math/GenericMath.java
public static double mod(double a, double div) {
        final double remainder = a % div;
        return remainder < 0 ? remainder + div : remainder;
    }
public static double mod(double a, double div) {
        final double remainder = a % div;
        return remainder < 0 ? remainder + div : remainder;
    }
Returns the modulo of 'a' by 'div' with corrections for negative numbers.

@param a The dividend
@param div The divider
@return The corrected modulo