Math.floorDiv()
Returns the highest long value lower or equal to the algebraic quotient.
Syntax
Math.floorDiv(long input_number1,long input_number2)
Output is a long value .
Watch the difference if output is negative ( between a division and floorDiv ) .
System.out.println(Math.floorDiv(20,7)); //2
System.out.println(Math.floor(20/7)); //2.0
System.out.println(Math.floorDiv(-20,7)); //-3
System.out.println(Math.floor(-20/7)); //-2.0
« All Math functions
« Java
This article is written by plus2net.com team.
plus2net.com