Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static public double truncateDecimals(double n, int numberOfDecimals){
- return Math.floor(n*Math.pow(10,numberOfDecimals))/Math.pow(10, numberOfDecimals);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement