MCPcopy Create free account
hub / github.com/antlr/codebuff / sqrtFloor

Method sqrtFloor

output/java_guava/1.4.16/IntMath.java:314–318  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

312 }
313
314 private static int sqrtFloor(int x) {
315 // There is no loss of precision in converting an int to a double, according to
316 // http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.2
317 return (int) Math.sqrt(x);
318 }
319
320 /**
321 * Returns the result of dividing {@code p} by {@code q}, rounding using the specified

Callers 1

sqrtMethod · 0.95

Calls 1

sqrtMethod · 0.45

Tested by

no test coverage detected