MathUtils
Overview
MathUtils is a class in Aspose.3D FOSS for Java.
Utility class with mathematical functions.
This class provides 11 methods for working with MathUtils objects in Java programs.
Available methods include: calcNormal, clamp, findIntersection, pointInsideTriangle, rayIntersect, toDegree, toRadian.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Methods
| Signature | Description |
|---|---|
calcNormal(points: Vector3[]) → Vector3 | Calculates the normal vector from three points. |
findIntersection(p0: Vector2, d0: Vector2, p1: Vector2, d1: Vector2, results: Vector2[]) → int | Finds the intersection of two lines in 2D space. |
pointInsideTriangle(p: Vector2, p0: Vector2, p1: Vector2, p2: Vector2) → boolean | Checks if a point is inside a triangle. |
rayIntersect(origin: Vector2, dir: Vector2, a: Vector2, b: Vector2) → Vector2 | Finds the intersection of a ray and a line segment in 2D space. |
clamp(val: double, min: double, max: double) → double | Clamps a value between min and max. |
toDegree(radian: Vector3) → Vector3 | Converts radians to degrees. |
toRadian(degree: Vector3) → Vector3 | Converts degrees to radians. |
toDegree(radian: double) → double | Converts radians to degrees. |
toRadian(degree: double) → double | Converts degrees to radians. |
toDegree(x: double, y: double, z: double) → Vector3 | Converts radians to degrees. |
toRadian(x: double, y: double, z: double) → Vector3 | Converts degrees to radians. |