MCPcopy Create free account
hub / github.com/careercup/ctci / floorToNearestEpsilon

Method floorToNearestEpsilon

java/Chapter 7/Question7_6/Line.java:28–31  ·  view source on GitHub ↗
(double d)

Source from the content-addressed store, hash-verified

26 }
27
28 public static double floorToNearestEpsilon(double d) {
29 int r = (int) (d / epsilon);
30 return ((double) r) * epsilon;
31 }
32
33 public boolean isEquivalent(Object o) {
34 Line l = (Line) o;

Callers 2

countEquivalentLinesMethod · 0.95
insertLineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected