public final class Scalar3D extends Object
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
static Direction |
cartesianToPhi(double x,
double y)
Get the (polar) phi angle, which is the projected angle in the xy-plane from the x direction.
|
static double |
cartesianToRadius(double x,
double y,
double z)
Get the (polar) radius based on Cartesian coordinates.
|
static Direction |
cartesianToTheta(double x,
double y,
double z)
Get the (polar) theta angle, which is the angle from the z-direction, from Cartesian coordinates.
|
static double[] |
polarToCartesian(double r,
double theta,
double phi) |
public static double[] polarToCartesian(double r, double theta, double phi)
r
- double; the radiustheta
- double; the angle from the z directionphi
- double; the projected angle in the xy-plane from the x directionpublic static double cartesianToRadius(double x, double y, double z)
x
- double; the x-coordinatey
- double; the y-coordinatez
- double; the z-coordinatepublic static Direction cartesianToTheta(double x, double y, double z)
x
- double; the x-coordinatey
- double; the y-coordinatez
- double; the z-coordinatepublic static Direction cartesianToPhi(double x, double y)
x
- double; the x-coordinatey
- double; the y-coordinateCopyright © 2014–2019 Delft University of Technology. All rights reserved.