List of usage examples for com.google.common.geometry S1Angle radians
double radians
To view the source code for com.google.common.geometry S1Angle radians.
Click Source Link
From source file:com.bc.fiduceo.geometry.s2.BcS2TimeAxis.java
BcS2TimeAxis(LineString lineString, Date startTime, Date endTime) {
originalGeometry = lineString;/*from w w w. jav a2s .c om*/
this.polyline = (S2Polyline) lineString.getInner();
final S1Angle arclengthAngle = polyline.getArclengthAngle();
this.invLength = 1.0 / arclengthAngle.radians();
this.startTime = startTime;
this.timeInterval = endTime.getTime() - startTime.getTime();
}
From source file:com.bc.fiduceo.geometry.s2.BcS2TimeAxis.java
private long calculateLineDuration(S2Point intersectionStartPoint) { final S2Polyline offsetGeometry = createSubLineTo(intersectionStartPoint); final S1Angle offsetAngle = offsetGeometry.getArclengthAngle(); return (long) (timeInterval * offsetAngle.radians() * invLength); }