public class NumericalMethods extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NumericalMethods.TwoSum |
Constructor and Description |
---|
NumericalMethods() |
Modifier and Type | Method and Description |
---|---|
static boolean |
collinear(Position p0,
Position p1,
Position p2) |
static double |
crossProduct(double x0,
double y0,
double x1,
double y1) |
static double |
determinant(double a11,
double a12,
double a21,
double a22)
Calculates the determinant of a 2x2 matrix
|
static double |
determinant(double a11,
double a12,
double a13,
double a21,
double a22,
double a23,
double a31,
double a32,
double a33)
Calculates the determinant of a 3x3 matrix
|
static boolean |
isCounterClockwise(LinearRing<?> ring)
Determines whether the specified
LinearRing is counter-clockwise. |
static boolean |
isCounterClockwise(Position p0,
Position p1,
Position p2)
Determines if the triangle determined by p0, p1, p2 is counterclockwise in 2D.
|
static boolean |
isCounterClockwise(PositionSequence<?> positions)
Determines whether the specified
PositionSequence is counter-clockwise. |
public static double determinant(double a11, double a12, double a21, double a22)
a11
- a12
- a21
- a22
- public static double crossProduct(double x0, double y0, double x1, double y1)
public static double determinant(double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33)
a11
- a12
- a13
- a21
- a22
- a23
- a31
- a32
- a33
- public static boolean isCounterClockwise(Position p0, Position p1, Position p2)
This is equivalent to p2 is to the left of the line p0 - p1.
p0
- p1
- p2
- public static boolean isCounterClockwise(PositionSequence<?> positions)
PositionSequence
is counter-clockwise.
Only the first three positions, are inspected to determine whether the sequence is counter-clockwise. In case are less than three positions in the sequence, the method returns true.
positions
- a PositionSequence
public static boolean isCounterClockwise(LinearRing<?> ring)
LinearRing
is counter-clockwise.
Orientation is determined by calculating the signed area of the given ring and using the sign to determine the orientation
The specified Ring is assumed to be valid.
ring
- a LinearRing
Copyright © 2019 geolatte.org. All rights reserved.