Class Math
Defines a set of math functions that are useful for working with 3D meshes.
Inherited Members
Namespace: UnityEngine.ProBuilder
Assembly: Unity.ProBuilder.dll
Syntax
public static class Math
Fields
Name | Description |
---|---|
phi | Defines |
Methods
Name | Description |
---|---|
Average(IList<Vector2>, IList<int>) | Calculates and returns the average of a Vector2 array. |
Average(IList<Vector3>, IList<int>) | Calculates and returns the average of the specified Vector3 array. |
Average(IList<Vector4>, IList<int>) | Calculates and returns the average of a Vector4 array. |
Clamp(int, int, int) | Clamps an integer value to the specified range. |
DistancePointLineSegment(Vector2, Vector2, Vector2) | Returns the distance between a point and a finite line segment using Vector2s. |
DistancePointLineSegment(Vector3, Vector3, Vector3) | Returns the distance between a point and a finite line segment using Vector3s. |
GetNearestPointRayRay(Ray, Ray) | Calculates and returns the nearest point between two rays. |
Normal(ProBuilderMesh, Face) | Finds and returns the best normal for a face. |
Normal(Vector3, Vector3, Vector3) | Calculates and returns the unit vector normal of 3 points in a triangle. This is equivalent to: |
NormalTangentBitangent(ProBuilderMesh, Face) | Returns the first normal, tangent, and bitangent for this face using the first triangle available for tangent and bitangent. |
RayIntersectsTriangle(Ray, Vector3, Vector3, Vector3, out float, out Vector3) | Tests whether a raycast intersects a triangle. Does not test for culling. |
ReflectPoint(Vector2, Vector2, Vector2) | Reflects a point across a line segment. |
ScaleAroundPoint(Vector2, Vector2, Vector2) | Scales a Vector2 using the origin as the pivot point. |
Secant(float) | Returns the secant of a radian. This is equivalent to: |
SqrDistance(Vector3, Vector3) | Returns the squared distance between two points. This is the same as |
TriangleArea(Vector3, Vector3, Vector3) | Returns the area of a triangle. |