All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functionalj.functions.LongFuncs Maven / Gradle / Ivy

There is a newer version: 1.0.17
Show newest version
package functionalj.functions;

public class LongFuncs {

    public static long factorial(long value) {
        if (value <= 0) {
            return 1;
        }
        
        long factorial = 1;
        for (long i = 1; i <= value; i++) {
            factorial *= i;
        }
        return factorial;
    }
    
    // TODO - toBinary
    // TODO - toHex
    // TODO - toBase
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy