MCPcopy Create free account
hub / github.com/rambaut/figtree / scaleValue

Method scaleValue

src/figtree/treeviewer/ScaleAxis.java:606–612  ·  view source on GitHub ↗

Scale a value to between 0 and 1.

(double value)

Source from the content-addressed store, hash-verified

604 * Scale a value to between 0 and 1.
605 */
606 public double scaleValue(double value) {
607 if (!isCalibrated)
608 calibrate();
609
610 double f=(transform(value)-transform(minAxis))/(transform(maxAxis)-transform(minAxis));
611 return f;
612 }
613
614 /**
615 * @return a DecimalFormat for formating the axis labels

Callers

nothing calls this directly

Calls 2

calibrateMethod · 0.95
transformMethod · 0.95

Tested by

no test coverage detected