本文整理了Java中com.vividsolutions.jts.triangulate.quadedge.Vertex.distance()
方法的一些代码示例,展示了Vertex.distance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.distance()
方法的具体详情如下:
包路径:com.vividsolutions.jts.triangulate.quadedge.Vertex
类名称:Vertex
方法名:distance
暂无
代码示例来源:origin: com.vividsolutions/jts
/**
* Computes the value of the ratio of the circumradius to shortest edge. If smaller than some
* given tolerance B, the associated triangle is considered skinny. For an equal lateral
* triangle this value is 0.57735. The ratio is related to the minimum triangle angle theta by:
* circumRadius/shortestEdge = 1/(2sin(theta)).
*
* @param b second vertex of the triangle
* @param c third vertex of the triangle
* @return ratio of circumradius to shortest edge.
*/
public double circumRadiusRatio(Vertex b, Vertex c) {
Vertex x = this.circleCenter(b, c);
double radius = distance(x, b);
double edgeLength = distance(this, b);
double el = distance(b, c);
if (el < edgeLength) {
edgeLength = el;
}
el = distance(c, this);
if (el < edgeLength) {
edgeLength = el;
}
return radius / edgeLength;
}
代码示例来源:origin: com.vividsolutions/jts-core
/**
* Computes the value of the ratio of the circumradius to shortest edge. If smaller than some
* given tolerance B, the associated triangle is considered skinny. For an equal lateral
* triangle this value is 0.57735. The ratio is related to the minimum triangle angle theta by:
* circumRadius/shortestEdge = 1/(2sin(theta)).
*
* @param b second vertex of the triangle
* @param c third vertex of the triangle
* @return ratio of circumradius to shortest edge.
*/
public double circumRadiusRatio(Vertex b, Vertex c) {
Vertex x = this.circleCenter(b, c);
double radius = distance(x, b);
double edgeLength = distance(this, b);
double el = distance(b, c);
if (el < edgeLength) {
edgeLength = el;
}
el = distance(c, this);
if (el < edgeLength) {
edgeLength = el;
}
return radius / edgeLength;
}
内容来源于网络,如有侵权,请联系作者删除!