@Test public void testValueToAngle() { StandardDialScale s = new StandardDialScale(); assertEquals(175.0, s.valueToAngle(0.0), EPSILON); assertEquals(90.0, s.valueToAngle(50.0), EPSILON); assertEquals(5.0, s.valueToAngle(100.0), EPSILON); assertEquals(192.0, s.valueToAngle(-10.0), EPSILON); assertEquals(-12.0, s.valueToAngle(110.0), EPSILON); s = new StandardDialScale(0, 20, 180, -180.0, 10, 3); assertEquals(180.0, s.valueToAngle(0.0), EPSILON); assertEquals(90.0, s.valueToAngle(10.0), EPSILON); assertEquals(0.0, s.valueToAngle(20.0), EPSILON); }
@Override public double valueToAngle(double value) { double range = this.upperBound - this.lowerBound; double unit = this.extent / range; return this.startAngle + unit * (value - this.lowerBound); }
StandardDialScale extends AbstractDialLayer implements DialScale,
        Cloneable, PublicCloneable, Serializable { @Override public double valueToAngle(double value) { double range = this.upperBound - this.lowerBound; double unit = this.extent / range; return this.startAngle + unit * (value - this.lowerBound); } }
StandardDialScale extends AbstractDialLayer implements DialScale,
        Cloneable, PublicCloneable, Serializable { @Override public double valueToAngle(double value) { double range = this.upperBound - this.lowerBound; double unit = this.extent / range; return this.startAngle + unit * (value - this.lowerBound); } StandardDialScale();  StandardDialScale(double lowerBound, double upperBound,
            double startAngle, double extent, double majorTickIncrement,
            int minorTickCount); }
StandardDialScale extends AbstractDialLayer implements DialScale,
        Cloneable, PublicCloneable, Serializable { @Override public double valueToAngle(double value) { double range = this.upperBound - this.lowerBound; double unit = this.extent / range; return this.startAngle + unit * (value - this.lowerBound); } StandardDialScale();  StandardDialScale(double lowerBound, double upperBound,
            double startAngle, double extent, double majorTickIncrement,
            int minorTickCount); double getLowerBound(); void setLowerBound(double lower); double getUpperBound(); void setUpperBound(double upper); double getStartAngle(); void setStartAngle(double angle); double getExtent(); void setExtent(double extent); double getTickRadius(); void setTickRadius(double radius); double getMajorTickIncrement(); void setMajorTickIncrement(double increment); double getMajorTickLength(); void setMajorTickLength(double length); Paint getMajorTickPaint(); void setMajorTickPaint(Paint paint); Stroke getMajorTickStroke(); void setMajorTickStroke(Stroke stroke); int getMinorTickCount(); void setMinorTickCount(int count); double getMinorTickLength(); void setMinorTickLength(double length); Paint getMinorTickPaint(); void setMinorTickPaint(Paint paint); Stroke getMinorTickStroke(); void setMinorTickStroke(Stroke stroke); double getTickLabelOffset(); void setTickLabelOffset(double offset); Font getTickLabelFont(); void setTickLabelFont(Font font); Paint getTickLabelPaint(); void setTickLabelPaint(Paint paint); boolean getTickLabelsVisible(); void setTickLabelsVisible(boolean visible); NumberFormat getTickLabelFormatter(); void setTickLabelFormatter(NumberFormat formatter); boolean getFirstTickLabelVisible(); void setFirstTickLabelVisible(boolean visible); @Override boolean isClippedToWindow(); @Override void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame,
            Rectangle2D view); @Override double valueToAngle(double value); @Override double angleToValue(double angle); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
StandardDialScale extends AbstractDialLayer implements DialScale,
        Cloneable, PublicCloneable, Serializable { @Override public double valueToAngle(double value) { double range = this.upperBound - this.lowerBound; double unit = this.extent / range; return this.startAngle + unit * (value - this.lowerBound); } StandardDialScale();  StandardDialScale(double lowerBound, double upperBound,
            double startAngle, double extent, double majorTickIncrement,
            int minorTickCount); double getLowerBound(); void setLowerBound(double lower); double getUpperBound(); void setUpperBound(double upper); double getStartAngle(); void setStartAngle(double angle); double getExtent(); void setExtent(double extent); double getTickRadius(); void setTickRadius(double radius); double getMajorTickIncrement(); void setMajorTickIncrement(double increment); double getMajorTickLength(); void setMajorTickLength(double length); Paint getMajorTickPaint(); void setMajorTickPaint(Paint paint); Stroke getMajorTickStroke(); void setMajorTickStroke(Stroke stroke); int getMinorTickCount(); void setMinorTickCount(int count); double getMinorTickLength(); void setMinorTickLength(double length); Paint getMinorTickPaint(); void setMinorTickPaint(Paint paint); Stroke getMinorTickStroke(); void setMinorTickStroke(Stroke stroke); double getTickLabelOffset(); void setTickLabelOffset(double offset); Font getTickLabelFont(); void setTickLabelFont(Font font); Paint getTickLabelPaint(); void setTickLabelPaint(Paint paint); boolean getTickLabelsVisible(); void setTickLabelsVisible(boolean visible); NumberFormat getTickLabelFormatter(); void setTickLabelFormatter(NumberFormat formatter); boolean getFirstTickLabelVisible(); void setFirstTickLabelVisible(boolean visible); @Override boolean isClippedToWindow(); @Override void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame,
            Rectangle2D view); @Override double valueToAngle(double value); @Override double angleToValue(double angle); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }