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

SignatureDescription
toDegree(radian: Vector3)Vector3Converts 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)Vector3Converts 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[])Vector3Computes the surface normal of a polygon defined by an array of Vector3 points
findIntersection(p0: Vector2, d0: Vector2, p1: Vector2, d1: Vector2, results: Vector2[])numberComputes the intersection of two 2D lines, stores results, and returns the count
pointInsideTriangle(p: Vector2, p0: Vector2, p1: Vector2, p2: Vector2)booleanDetermines whether a 2D point lies inside the triangle formed by three vertices
rayIntersect(origin: Vector2, dir: Vector2, a: Vector2, b: Vector2)Vector2 | nullFinds the intersection of a ray and a line segment, returning the point or null
clamp(val: number, min: number, max: number)numberRestricts a numeric value to the inclusive range defined by min and max

See Also