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


plus2net.com






We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer