Example usage for com.google.common.geometry S1Angle radians

List of usage examples for com.google.common.geometry S1Angle radians

Introduction

In this page you can find the example usage for com.google.common.geometry S1Angle radians.

Prototype

double radians

To view the source code for com.google.common.geometry S1Angle radians.

Click Source Link

Usage

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);
}