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

Method getScaleFactor

src/figtree/treeviewer/TimeScale.java:51–56  ·  view source on GitHub ↗
(RootedTree tree)

Source from the content-addressed store, hash-verified

49 }
50
51 public double getScaleFactor(RootedTree tree) {
52 if (Double.isNaN(scaleFactor)) {
53 return rootAge / tree.getHeight(tree.getRootNode());
54 }
55 return scaleFactor * (isReversed ? -1.0 : 1.0);
56 }
57
58 public double getAge(double height, RootedTree tree) {
59 return (height * getScaleFactor(tree)) + offsetAge;

Callers 5

getAgeMethod · 0.95
getTimeMethod · 0.95
getHeightMethod · 0.95
getLengthMethod · 0.95
getTreeScaleMethod · 0.80

Calls 2

getRootNodeMethod · 0.80
getHeightMethod · 0.45

Tested by

no test coverage detected