MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / round

Method round

src/main/java/com/thealgorithms/geometry/WusLine.java:232–234  ·  view source on GitHub ↗

Rounds a number to the nearest integer. @param x the input number @return the nearest integer value as a double

(double x)

Source from the content-addressed store, hash-verified

230 * @return the nearest integer value as a double
231 */
232 private static double round(double x) {
233 return Math.floor(x + 0.5);
234 }
235}

Callers 3

processEndpointMethod · 0.95
findLineMethod · 0.45
hashCodeMethod · 0.45

Calls 1

floorMethod · 0.45

Tested by

no test coverage detected