public final class V3D extends Object
Modifier and Type | Field and Description |
---|---|
static Function<Double,Double> |
DEG_TO_RAD |
static Function<double[],double[]> |
DEGS_TO_RADS |
static double |
EPS |
static Function<Double,Double> |
RAD_TO_DEG |
static Function<double[],double[]> |
RADS_TO_DEGS |
Modifier and Type | Method and Description |
---|---|
double |
angleDeg(V3D other)
Calculates the angle closed by two vectors in degrees.
|
double |
angleRad(V3D other)
Calculates the angle closed by two vectors in radians.
|
static double |
dihedralDeg(double[] p1,
double[] p2,
double[] p3,
double[] p4)
Calculate dihedral angle in degrees.
|
static double |
dihedralRad(double[] p1,
double[] p2,
double[] p3,
double[] p4)
Calculate dihedral angle in radians.
|
double |
dot() |
double |
dot(V3D other) |
double |
length() |
V3D |
minus(V3D other) |
V3D |
negate() |
V3D |
norm() |
V3D |
plus(V3D other) |
V3D |
scale(double a) |
String |
toString() |
static V3D |
v(double[] coords) |
static V3D |
v(double x,
double y,
double z) |
V3D |
vectProd(V3D other) |
public static double EPS
public static Function<double[],double[]> DEGS_TO_RADS
public static Function<double[],double[]> RADS_TO_DEGS
public static V3D v(double x, double y, double z)
public static V3D v(double[] coords)
public double dot(V3D other)
public V3D negate()
public double dot()
public V3D scale(double a)
public double length()
public V3D norm()
public double angleRad(V3D other)
other
- The other vectorpublic double angleDeg(V3D other)
other
- The other vectorpublic static double dihedralDeg(double[] p1, double[] p2, double[] p3, double[] p4)
p1
- Point 1p2
- Point 2p3
- Point 3p4
- Point 4public static double dihedralRad(double[] p1, double[] p2, double[] p3, double[] p4)
p1
- Point 1p2
- Point 2p3
- Point 3p4
- Point 4