diff --git a/Grapher/src/graph/LineGraph.java b/Grapher/src/graph/LineGraph.java index 6df6137..e55c08e 100644 --- a/Grapher/src/graph/LineGraph.java +++ b/Grapher/src/graph/LineGraph.java @@ -176,6 +176,10 @@ public void addValue(double value){ * @param point using cartesian coordinates. */ public void addPoint(Point2D point){ + if(point.getX() == Double.NaN) + throw new RuntimeException("X value must be a number."); + if(point.getY() == Double.NaN) + throw new RuntimeException(); point = translate(point); points.add(point); isNormalized = false;