Class GeometricUtils

java.lang.Object
software.bluelib.utils.math.GeometricUtils

public class GeometricUtils extends Object
A class providing utility methods for various geometric calculations.

Key Methods:

Since:
1.0.0
  • Method Details

    • calculateDistance2D

      public static double calculateDistance2D(double pX1, double pY1, double pX2, double pY2)
      A Double that calculates the Euclidean distance between two points in 2D space.
      Parameters:
      pX1 - Double - The x-coordinate of the first point.
      pY1 - Double - The y-coordinate of the first point.
      pX2 - Double - The x-coordinate of the second point.
      pY2 - Double - The y-coordinate of the second point.
      Returns:
      The distance between the two points.
      Since:
      1.0.0
    • calculateDistance3D

      public static double calculateDistance3D(double pX1, double pY1, double pZ1, double pX2, double pY2, double pZ2)
      A Double that calculates the Euclidean distance between two points in 3D space.
      Parameters:
      pX1 - Double - The x-coordinate of the first point.
      pY1 - Double - The y-coordinate of the first point.
      pZ1 - Double - The z-coordinate of the first point.
      pX2 - Double - The x-coordinate of the second point.
      pY2 - Double - The y-coordinate of the second point.
      pZ2 - Double - The z-coordinate of the second point.
      Returns:
      The distance between the two points in 3D space.
      Since:
      1.0.0
    • calculateCircleArea

      public static double calculateCircleArea(double pRadius)
      A Double that calculates the area of a circle given its radius.
      Parameters:
      pRadius - Double - The radius of the circle.
      Returns:
      The area of the circle.
      Since:
      1.0.0
    • calculateCircleCircumference

      public static double calculateCircleCircumference(double pRadius)
      A Double that calculates the circumference of a circle given its radius.
      Parameters:
      pRadius - Double - The radius of the circle.
      Returns:
      The circumference of the circle.
      Since:
      1.0.0
    • calculateRectangleArea

      public static double calculateRectangleArea(double pWidth, double pHeight)
      A Double that calculates the area of a rectangle given its width and height.
      Parameters:
      pWidth - Double - The width of the rectangle.
      pHeight - Double - The height of the rectangle.
      Returns:
      The area of the rectangle.
      Since:
      1.0.0
    • calculateRectanglePerimeter

      public static double calculateRectanglePerimeter(double pWidth, double pHeight)
      A Double that calculates the perimeter of a rectangle given its width and height.
      Parameters:
      pWidth - Double - The width of the rectangle.
      pHeight - Double - The height of the rectangle.
      Returns:
      The perimeter of the rectangle.
      Since:
      1.0.0
    • calculateTriangleArea

      public static double calculateTriangleArea(double pBase, double pHeight)
      A Double that calculates the area of a triangle given its base and height.
      Parameters:
      pBase - Double - The base of the triangle.
      pHeight - Double - The height of the triangle.
      Returns:
      The area of the triangle.
      Since:
      1.0.0
    • calculateTrianglePerimeter

      public static double calculateTrianglePerimeter(double pSide1, double pSide2, double pSide3)
      A Double that calculates the perimeter of a triangle given its three sides.
      Parameters:
      pSide1 - Double - The first side of the triangle.
      pSide2 - Double - The second side of the triangle.
      pSide3 - Double - The third side of the triangle.
      Returns:
      The perimeter of the triangle.
      Since:
      1.0.0
    • calculateSphereVolume

      public static double calculateSphereVolume(double pRadius)
      A Double that calculates the volume of a sphere given its radius.
      Parameters:
      pRadius - Double - The radius of the sphere.
      Returns:
      The volume of the sphere.
      Since:
      1.0.0
    • calculateCubeSurfaceArea

      public static double calculateCubeSurfaceArea(double pSideLength)
      A Double that calculates the surface area of a cube given its side length.
      Parameters:
      pSideLength - Double - The length of a side of the cube.
      Returns:
      The surface area of the cube.
      Since:
      1.0.0
    • calculateCylinderVolume

      public static double calculateCylinderVolume(double pRadius, double pHeight)
      A Double that calculates the volume of a cylinder given its radius and height.
      Parameters:
      pRadius - Double - The radius of the cylinder's base.
      pHeight - Double - The height of the cylinder.
      Returns:
      The volume of the cylinder.
      Since:
      1.0.0
    • calculateConeSurfaceArea

      public static double calculateConeSurfaceArea(double pRadius, double pSlantHeight)
      A Double that calculates the surface area of a cone given its radius and slant height.
      Parameters:
      pRadius - Double - The radius of the base of the cone.
      pSlantHeight - Double - The slant height of the cone.
      Returns:
      The surface area of the cone.
      Since:
      1.0.0