本文整理了Java中gov.nasa.worldwind.geom.Angle.subtract()
方法的一些代码示例,展示了Angle.subtract()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Angle.subtract()
方法的具体详情如下:
包路径:gov.nasa.worldwind.geom.Angle
类名称:Angle
方法名:subtract
[英]Obtains the difference of these two angles. Does not accept a null argument. This method is not commutative. Neither this angle nor angle is changed, instead the result is returned as a new angle.
[中]获得这两个角度的差。不接受空参数。这种方法是不可交换的。此角度和角度都不会更改,而是将结果作为新角度返回。
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
/**
* Computes the shortest distance between this and angle, as an angle.
*
* @param angle the angle to measure angular distance to.
*
* @return the angular distance between this and <code>value</code>.
*/
public Angle angularDistanceTo(Angle angle)
{
if (angle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
double differenceDegrees = angle.subtract(this).degrees;
if (differenceDegrees < -180)
differenceDegrees += 360;
else if (differenceDegrees > 180)
differenceDegrees -= 360;
double absAngle = Math.abs(differenceDegrees);
return Angle.fromDegrees(absAngle);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public Position subtract(Position that)
{
Angle lat = Angle.normalizedLatitude(this.latitude.subtract(that.latitude));
Angle lon = Angle.normalizedLongitude(this.longitude.subtract(that.longitude));
return new Position(lat, lon, this.elevation - that.elevation);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public LatLon subtract(LatLon that)
{
if (that == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
Angle lat = Angle.normalizedLatitude(this.latitude.subtract(that.latitude));
Angle lon = Angle.normalizedLongitude(this.longitude.subtract(that.longitude));
return new LatLon(lat, lon);
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
/**
* Computes the shortest distance between this and angle, as an angle.
*
* @param angle the angle to measure angular distance to.
*
* @return the angular distance between this and <code>value</code>.
*/
public Angle angularDistanceTo(Angle angle)
{
if (angle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
double differenceDegrees = angle.subtract(this).degrees;
if (differenceDegrees < -180)
differenceDegrees += 360;
else if (differenceDegrees > 180)
differenceDegrees -= 360;
double absAngle = Math.abs(differenceDegrees);
return Angle.fromDegrees(absAngle);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public LatLon subtract(Position that)
{
if (that == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
Angle lat = Angle.normalizedLatitude(this.latitude.subtract(that.getLatitude()));
Angle lon = Angle.normalizedLongitude(this.longitude.subtract(that.getLongitude()));
return new LatLon(lat, lon);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
final double L = p2.longitude.subtract(p1.longitude).radians;
内容来源于网络,如有侵权,请联系作者删除!