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

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here




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