本文整理了Java中com.vividsolutions.jts.triangulate.quadedge.Vertex.magn()
方法的一些代码示例,展示了Vertex.magn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.magn()
方法的具体详情如下:
包路径:com.vividsolutions.jts.triangulate.quadedge.Vertex
类名称:Vertex
方法名:magn
暂无
代码示例来源:origin: com.vividsolutions/jts
public int classify(Vertex p0, Vertex p1) {
Vertex p2 = this;
Vertex a = p1.sub(p0);
Vertex b = p2.sub(p0);
double sa = a.crossProduct(b);
if (sa > 0.0)
return LEFT;
if (sa < 0.0)
return RIGHT;
if ((a.getX() * b.getX() < 0.0) || (a.getY() * b.getY() < 0.0))
return BEHIND;
if (a.magn() < b.magn())
return BEYOND;
if (p0.equals(p2))
return ORIGIN;
if (p1.equals(p2))
return DESTINATION;
return BETWEEN;
}
代码示例来源:origin: com.vividsolutions/jts-core
public int classify(Vertex p0, Vertex p1) {
Vertex p2 = this;
Vertex a = p1.sub(p0);
Vertex b = p2.sub(p0);
double sa = a.crossProduct(b);
if (sa > 0.0)
return LEFT;
if (sa < 0.0)
return RIGHT;
if ((a.getX() * b.getX() < 0.0) || (a.getY() * b.getY() < 0.0))
return BEHIND;
if (a.magn() < b.magn())
return BEYOND;
if (p0.equals(p2))
return ORIGIN;
if (p1.equals(p2))
return DESTINATION;
return BETWEEN;
}
内容来源于网络,如有侵权,请联系作者删除!