Why java's Math.round and Math.floor have different signature?

Viewed 26

java's Math.round is following signature:

public static long round(double a)

returns long, which is quite normal, but Math.floor signature is:

public static double floor(double a)

which returns a double, shouldn't it also return long? which is quite weird.

0 Answers
Related