Class Coord3D

java.lang.Object
org.jzy3d.maths.doubles.Coord3D

public class Coord3D extends Object
Store coordinates in double precision (whereas Coord3d store coordinates with float precision)
Author:
martin
  • Field Details

    • x

      public double x
    • y

      public double y
    • z

      public double z
  • Constructor Details

    • Coord3D

      public Coord3D(double x, double y, double z)
    • Coord3D

      public Coord3D(Coord3d c)
  • Method Details

    • cartesian

      public Coord3D cartesian()
    • cartesianSelf

      public Coord3D cartesianSelf()
    • polar

      public Coord3D polar()
      Converts the current Coord3d into polar coordinates and return the result in a new Coord3d.
      Returns:
      the result Coord3d
    • polarSelf

      public Coord3D polarSelf()
    • add

      public Coord3D add(Coord3D c2)
      Add a Coord3d to the current one and return the result in a new Coord3d.
      Parameters:
      c2 -
      Returns:
      the result Coord3d
    • add

      public Coord3D add(double x, double y, double z)
    • addSelf

      public Coord3D addSelf(Coord3d c2)
    • addSelf

      public Coord3D addSelf(float x, float y, float z)
    • add

      public Coord3D add(float value)
      Add a value to all components of the current Coord and return the result in a new Coord3d.
      Parameters:
      value -
      Returns:
      the result Coord3d
    • addSelf

      public Coord3D addSelf(float value)
    • sub

      public Coord3D sub(Coord3D c2)
      Substract a Coord3d to the current one and return the result in a new Coord3d.
      Parameters:
      c2 -
      Returns:
      the result Coord3d
    • subSelf

      public Coord3D subSelf(Coord3D c2)
    • sub

      public Coord3D sub(double value)
      Substract a value to all components of the current Coord and return the result in a new Coord3d.
      Parameters:
      value -
      Returns:
      the result Coord3d
    • subSelf

      public Coord3D subSelf(double value)
    • mul

      public Coord3D mul(Coord3D c2)
      Multiply a Coord3d to the current one and return the result in a new Coord3d.
      Parameters:
      c2 -
      Returns:
      the result Coord3d
    • mul

      public Coord3D mul(double x, double y, double z)
    • mul

      public Coord3D mul(double value)
      Multiply all components of the current Coord and return the result in a new Coord3d.
      Parameters:
      value -
      Returns:
      the result Coord3d
    • mulSelf

      public void mulSelf(Coord3D c2)
    • div

      public Coord3D div(Coord3D c2)
      Divise a Coord3d to the current one and return the result in a new Coord3d.
      Parameters:
      c2 -
      Returns:
      the result Coord3d
    • divSelf

      public void divSelf(Coord3D c2)
    • div

      public Coord3D div(double value)
      Divise all components of the current Coord by the same value and return the result in a new Coord3d.
      Parameters:
      value -
      Returns:
      the result Coord3d
    • toString

      public String toString()
      Return a string representation of this coordinate.
      Overrides:
      toString in class Object
    • toCoord3d

      public Coord3d toCoord3d()
    • toArray

      public double[] toArray()
      Return an array representation of this coordinate.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object