public class GeomUtils extends Object
| Constructor and Description |
|---|
GeomUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
distance(int ax,
int ay,
int bx,
int by) |
static double |
distance(int px,
int py,
int ax,
int ay,
int bx,
int by)
see : https://demonstrations.wolfram.com/DistanceOfAPointToASegment To
compute the distance from point p to segment ab (all as complex numbers)
compute first z=(p-a)/(b-a).
|
static boolean |
isOnSegment(int cx,
int cy,
int ax,
int ay,
int bx,
int by) |
static boolean |
isOnSegment(Point test,
Point segmentStartPoint,
Point segmentEndPoint) |
static void |
main(String[] args) |
public static boolean isOnSegment(Point test, Point segmentStartPoint, Point segmentEndPoint)
public static boolean isOnSegment(int cx,
int cy,
int ax,
int ay,
int bx,
int by)
public static void main(String[] args)
public static double distance(int px,
int py,
int ax,
int ay,
int bx,
int by)
px - x to check if it is between a and bpy - y to check if it is between a and bax - a xay - a ybx - b xby - b ypublic static double distance(int ax,
int ay,
int bx,
int by)
Copyright © 2021 vpc open source initiative. All rights reserved.