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

Method sqrtFloor

output/java_guava/1.4.19/IntMath.java:309–313  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

307 }
308
309 private static int sqrtFloor(int x) {
310 // There is no loss of precision in converting an int to a double, according to
311 // http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.2
312 return (int) Math.sqrt(x);
313 }
314
315 /**
316 * 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