/** TODO: JAVADOC */ private void drawl(Complex x, Complex y, Complex X, Complex Y, boolean fix) { assert y != null; assert Y != null; assert !x.isNaN(); assert !X.isNaN(); if (y.isNaN() || Y.isNaN()) return; if (!fix && grapher.components().type().equals(West.Math.Display.GraphComponents.GraphTypes.POLAR)) { assert y.isOnlyReal() : y + " can only be real when graphing!"; assert Y.isOnlyReal() : Y + " can only be real when graphing!"; Complex r = y; y = y.mult(x.sin()); // y is r, x is theta x = r.mult(x.cos()); // y is r, x is theta r = Y; Y = Y.mult(X.sin()); // Y is r, X is theta X = r.mult(X.cos()); // Y is r, X is theta } if (!fix && grapher.components().type().equals(West.Math.Display.GraphComponents.GraphTypes.IMAG)) { assert false; } double[] xy = fix(x.aIsOnlyReal().real(), y.aIsOnlyReal().real()); double[] XY = fix(X.aIsOnlyReal().real(), Y.aIsOnlyReal().real()); drawer.drawLine((int) xy[0], (int) xy[1], (int) XY[0], (int) XY[1]); // width, height }