MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getLength

Method getLength

ij/src/main/java/ij/gui/Line.java:444–451  ·  view source on GitHub ↗

Returns the length of this line.

()

Source from the content-addressed store, hash-verified

442
443 /** Returns the length of this line. */
444 public double getLength() {
445 if (imp==null || IJ.altKeyDown())
446 return getRawLength();
447 else {
448 Calibration cal = imp.getCalibration();
449 return Math.sqrt(sqr((x2d-x1d)*cal.pixelWidth) + sqr((y2d-y1d)*cal.pixelHeight));
450 }
451 }
452
453 /** Returns the length of this line in pixels. */
454 public double getRawLength() {

Callers 2

handleMouseUpMethod · 0.95
showStatusMethod · 0.95

Calls 5

altKeyDownMethod · 0.95
getRawLengthMethod · 0.95
getCalibrationMethod · 0.80
sqrtMethod · 0.45
sqrMethod · 0.45

Tested by

no test coverage detected