![JAR search and dependency download from the Maven repository](/logo.png)
zext.plantuml.com.ctreber.acearth.util.Point3D Maven / Gradle / Ivy
package zext.plantuml.com.ctreber.acearth.util;
/**
* A point in a 2 axis space.
*
*
© 2002 Christian Treber, [email protected]
* @author Christian Treber, [email protected]
*
*/
public class Point3D
{
// ::remove folder when __HAXE__
private double fX;
private double fY;
private double fZ;
public Point3D(double pX, double pY, double pZ)
{
fX = pX;
fY = pY;
fZ = pZ;
}
public double getX()
{
return fX;
}
public double getY()
{
return fY;
}
public double getZ()
{
return fZ;
}
public String toString()
{
return "x: " + fX + ", y: " + fY + ", z: " + fZ;
}
public Coordinate getCoordinate()
{
return new Coordinate(Toolkit.radsToDegs(Math.asin(fY)),
Toolkit.radsToDegs(Math.atan2(fX, fZ)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy