| java.lang.Object com.vividsolutions.jump.geom.CoordUtil
CoordUtil | public class CoordUtil (Code) | | Utility functions for working with Coordinates.
|
Method Summary | |
public static Coordinate | add(Coordinate c1, Coordinate c2) Adds two coordinates. | public static Point2D | add(Point2D a, Point2D b) | public static Coordinate | average(Coordinate c1, Coordinate c2) Returns the average of two Coordinates. | public static Coordinate | average(Collection coordinates) | public static Coordinate | closest(Collection coordinates, Coordinate p) | public static Coordinate | divide(Coordinate c, double d) Divides a coordinate by a scalar. | public static Coordinate | multiply(double d, Coordinate c) Multiplies a scalar and a coordinate. | public static Coordinate | subtract(Coordinate c1, Coordinate c2) Subtracts two coordinates. | public static Point2D | subtract(Point2D a, Point2D b) | public static Coordinate | toCoordinate(Point2D point) | public static Point2D | toPoint2D(Coordinate coordinate) |
add | public static Coordinate add(Coordinate c1, Coordinate c2)(Code) | | Adds two coordinates.
Parameters: c1 - the first coordinate Parameters: c2 - the second coordinate a new coordinate: c1 + c2 |
average | public static Coordinate average(Coordinate c1, Coordinate c2)(Code) | | Returns the average of two Coordinates.
Parameters: c1 - one coordinate Parameters: c2 - another coordinate a new Coordinate with the average x and average y |
average | public static Coordinate average(Collection coordinates)(Code) | | Parameters: coordinates - not empty |
closest | public static Coordinate closest(Collection coordinates, Coordinate p)(Code) | | Parameters: coordinates - not empty |
divide | public static Coordinate divide(Coordinate c, double d)(Code) | | Divides a coordinate by a scalar.
Parameters: c - the coordinate Parameters: d - the scalar * a new coordinate: c / d |
multiply | public static Coordinate multiply(double d, Coordinate c)(Code) | | Multiplies a scalar and a coordinate.
Parameters: d - the scalar Parameters: c - the coordinate a new coordinate: d * c |
subtract | public static Coordinate subtract(Coordinate c1, Coordinate c2)(Code) | | Subtracts two coordinates.
Parameters: c1 - the first coordinate Parameters: c2 - the second coordinate a new coordinate: c1 - c2 |
toCoordinate | public static Coordinate toCoordinate(Point2D point)(Code) | | |
toPoint2D | public static Point2D toPoint2D(Coordinate coordinate)(Code) | | |
|
|