/** Compute circumference by adding up the length of it's segemnts. */ @Override public final void compute() { if (!polygon.isDefined()) { circum.setUndefined(); return; } GeoSegmentND[] segment = polygon.getSegments(); double length = 0; for (int i = 0; i < segment.length; i++) { length = length + (segment[i].getLength()); } circum.setValue(length); }
@Override public final void compute() { if (text.isDefined()) length.setValue(text.getTextString().length()); else length.setUndefined(); }