Package org.joml

Class Circled

    • Field Detail

      • x

        public double x
        The x coordiante of the circle's center.
      • y

        public double y
        The y coordiante of the circle's center.
      • r

        public double r
        The radius of the circle.
    • Constructor Detail

      • Circled

        public Circled​()
        Create a new Circled with center position (0, 0, 0) and radius 0.
      • Circled

        public Circled​(Circled source)
        Create a new Circled as a copy of the given source.
        Parameters:
        source - the Circled to copy from
      • Circled

        public Circled​(double x,
                       double y,
                       double r)
        Create a new Circled with center position (x, y) and radius r.
        Parameters:
        x - the x coordinate of the circle's center
        y - the y coordinate of the circle's center
        r - the radius of the circle
    • Method Detail

      • translate

        public Circled translate​(Vector2dc xy)
        Translate this by the given vector xy.
        Parameters:
        xy - the vector to translate by
        Returns:
        this
      • translate

        public Circled translate​(Vector2dc xy,
                                 Circled dest)
        Translate this by the given vector xy and store the result in dest.
        Parameters:
        xy - the vector to translate by
        dest - will hold the result
        Returns:
        dest
      • translate

        public Circled translate​(Vector2fc xy)
        Translate this by the given vector xy.
        Parameters:
        xy - the vector to translate by
        Returns:
        this
      • translate

        public Circled translate​(Vector2fc xy,
                                 Circled dest)
        Translate this by the given vector xy and store the result in dest.
        Parameters:
        xy - the vector to translate by
        dest - will hold the result
        Returns:
        dest
      • translate

        public Circled translate​(double x,
                                 double y)
        Translate this by the vector (x, y).
        Parameters:
        x - the x coordinate to translate by
        y - the y coordinate to translate by
        Returns:
        this
      • translate

        public Circled translate​(double x,
                                 double y,
                                 Circled dest)
        Translate this by the vector (x, y) and store the result in dest.
        Parameters:
        x - the x coordinate to translate by
        y - the y coordinate to translate by
        dest - will hold the result
        Returns:
        dest
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class Object
      • toString

        public String toString​()
        Return a string representation of this circle.

        This method creates a new DecimalFormat on every invocation with the format string "0.000E0;-".

        Overrides:
        toString in class Object
        Returns:
        the string representation
      • toString

        public String toString​(NumberFormat formatter)
        Return a string representation of this circle by formatting the vector components with the given NumberFormat.
        Parameters:
        formatter - the NumberFormat used to format the components with
        Returns:
        the string representation