Package software.bluelib.utils.math
Class GeometricUtils
java.lang.Object
software.bluelib.utils.math.GeometricUtils
A
class providing utility methods for various geometric calculations.
Key Methods:
calculateDistance2D(double, double, double, double)- Calculates the Euclidean distance between two points in 2D space.calculateDistance3D(double, double, double, double, double, double)- Calculates the Euclidean distance between two points in 3D space.calculateCircleArea(double)- Calculates the area of a circle given its radius.calculateCircleCircumference(double)- Calculates the circumference of a circle given its radius.calculateRectangleArea(double, double)- Calculates the area of a rectangle given its width and height.calculateRectanglePerimeter(double, double)- Calculates the perimeter of a rectangle given its width and height.calculateTriangleArea(double, double)- Calculates the area of a triangle given its base and height.calculateTrianglePerimeter(double, double, double)- Calculates the perimeter of a triangle given its three sides.calculateSphereVolume(double)- Calculates the volume of a sphere given its radius.calculateCubeSurfaceArea(double)- Calculates the surface area of a cube given its side length.calculateCylinderVolume(double, double)- Calculates the volume of a cylinder given its radius and height.calculateConeSurfaceArea(double, double)- Calculates the surface area of a cone given its radius and slant height.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateCircleArea(double pRadius) ADoublethat calculates the area of a circle given its radius.static doublecalculateCircleCircumference(double pRadius) ADoublethat calculates the circumference of a circle given its radius.static doublecalculateConeSurfaceArea(double pRadius, double pSlantHeight) ADoublethat calculates the surface area of a cone given its radius and slant height.static doublecalculateCubeSurfaceArea(double pSideLength) ADoublethat calculates the surface area of a cube given its side length.static doublecalculateCylinderVolume(double pRadius, double pHeight) ADoublethat calculates the volume of a cylinder given its radius and height.static doublecalculateDistance2D(double pX1, double pY1, double pX2, double pY2) ADoublethat calculates the Euclidean distance between two points in 2D space.static doublecalculateDistance3D(double pX1, double pY1, double pZ1, double pX2, double pY2, double pZ2) ADoublethat calculates the Euclidean distance between two points in 3D space.static doublecalculateRectangleArea(double pWidth, double pHeight) ADoublethat calculates the area of a rectangle given its width and height.static doublecalculateRectanglePerimeter(double pWidth, double pHeight) ADoublethat calculates the perimeter of a rectangle given its width and height.static doublecalculateSphereVolume(double pRadius) ADoublethat calculates the volume of a sphere given its radius.static doublecalculateTriangleArea(double pBase, double pHeight) ADoublethat calculates the area of a triangle given its base and height.static doublecalculateTrianglePerimeter(double pSide1, double pSide2, double pSide3) ADoublethat calculates the perimeter of a triangle given its three sides.
-
Method Details
-
calculateDistance2D
public static double calculateDistance2D(double pX1, double pY1, double pX2, double pY2) ADoublethat calculates the Euclidean distance between two points in 2D space. -
calculateDistance3D
public static double calculateDistance3D(double pX1, double pY1, double pZ1, double pX2, double pY2, double pZ2) ADoublethat 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) ADoublethat 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) ADoublethat 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) ADoublethat calculates the area of a rectangle given its width and height. -
calculateRectanglePerimeter
public static double calculateRectanglePerimeter(double pWidth, double pHeight) ADoublethat calculates the perimeter of a rectangle given its width and height. -
calculateTriangleArea
public static double calculateTriangleArea(double pBase, double pHeight) ADoublethat calculates the area of a triangle given its base and height. -
calculateTrianglePerimeter
public static double calculateTrianglePerimeter(double pSide1, double pSide2, double pSide3) ADoublethat calculates the perimeter of a triangle given its three sides. -
calculateSphereVolume
public static double calculateSphereVolume(double pRadius) ADoublethat 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) ADoublethat 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) ADoublethat calculates the volume of a cylinder given its radius and height. -
calculateConeSurfaceArea
public static double calculateConeSurfaceArea(double pRadius, double pSlantHeight) ADoublethat calculates the surface area of a cone given its radius and slant height.
-