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

SignatureDescription
calcNormal(points: Vector3[])Vector3Calculates the normal vector from three points.
findIntersection(p0: Vector2, d0: Vector2, p1: Vector2, d1: Vector2, results: Vector2[])intFinds the intersection of two lines in 2D space.
pointInsideTriangle(p: Vector2, p0: Vector2, p1: Vector2, p2: Vector2)booleanChecks if a point is inside a triangle.
rayIntersect(origin: Vector2, dir: Vector2, a: Vector2, b: Vector2)Vector2Finds the intersection of a ray and a line segment in 2D space.
clamp(val: double, min: double, max: double)doubleClamps a value between min and max.
toDegree(radian: Vector3)Vector3Converts radians to degrees.
toRadian(degree: Vector3)Vector3Converts degrees to radians.
toDegree(radian: double)doubleConverts radians to degrees.
toRadian(degree: double)doubleConverts degrees to radians.
toDegree(x: double, y: double, z: double)Vector3Converts radians to degrees.
toRadian(x: double, y: double, z: double)Vector3Converts degrees to radians.

See Also

 English