MathUtils
Overview
MathUtils is a class in Aspose.3D FOSS for Typescript.
MathUtils.toDegree converts a radian Vector3 to degrees and returns a Vector3.
Methods
| Signature | Description |
|---|---|
toDegree(radian: Vector3) → Vector3 | Converts three radian components (x,y,z) to degrees and returns a Vector3 |
toDegree(radian: number) → number | |
toDegree(x: number, y: number, z: number) → Vector3 | |
toDegree() → any | |
toRadian(degree: Vector3) → Vector3 | Converts three degree components (x,y,z) to radians and returns a Vector3 |
toRadian(degree: number) → number | |
toRadian(x: number, y: number, z: number) → Vector3 | |
toRadian() → any | |
calcNormal(points: Vector3[]) → Vector3 | Computes the surface normal of a polygon defined by an array of Vector3 points |
findIntersection(p0: Vector2, d0: Vector2, p1: Vector2, d1: Vector2, results: Vector2[]) → number | Computes the intersection of two 2D lines, stores results, and returns the count |
pointInsideTriangle(p: Vector2, p0: Vector2, p1: Vector2, p2: Vector2) → boolean | Determines whether a 2D point lies inside the triangle formed by three vertices |
rayIntersect(origin: Vector2, dir: Vector2, a: Vector2, b: Vector2) → Vector2 | null | Finds the intersection of a ray and a line segment, returning the point or null |
clamp(val: number, min: number, max: number) → number | Restricts a numeric value to the inclusive range defined by min and max |