Math.ceil(-3.2),Math.floor(-3.2)
Answers
Answer:
Math.ceil(-3.2) = -3.0
Math.floor(-3.2) = -4.0
Explanation:
ceil() :
If the argument is positive or negative double value, this method will return the ceil value.
If the argument is NaN, this method will return same argument.
If the argument is Infinity, this method will return Infinity with the same sign as the argument.
If the argument is positive or negative Zero, this method will return Zero with same sign as the argument.
If the argument is less than Zero but greater than -1.0, this method will return Negative Zero as output.
floor() :
If the argument is positive or negative double value, this method will return the Floor value.
If the argument is NaN, this method will return same argument.
If the argument is Infinity, this method will return Infinity with same sign as the argument.