public final class Trig extends Object
Modifier and Type | Method and Description |
---|---|
static double |
distance3D(double x,
double y,
double z)
Calculate the distance to the origin, (0,0,0).
|
static double |
distance3D(double px,
double py,
double pz,
double qx,
double qy,
double qz)
Calculate the distance between 2 3D points p(x, y, z) and q
(x, y, z) using Pythagoras' theorem
|
public static double distance3D(double px, double py, double pz, double qx, double qy, double qz)
px
- x-coordinate of first pointpy
- y-coordinate of first pointpz
- z-coordinate of first pointqx
- x-coordinate of second pointqy
- y-coordinate of second pointqz
- z-coordinate of second pointpublic static double distance3D(double x, double y, double z)
Calculate the distance to the origin, (0,0,0). Given 3 orthogonal vectors, calculates the vector sum
x
- x-coordinate of the point.y
- y-coordinate of the point.z
- z-coordinate of the point.Copyright © 2018–2022 BoneJ. All rights reserved.