Polarith AI
1.8
Mathv Class Reference

Description

Provides some basic mathematical functionalities for working with vector-based geometry like lines or planes.

Public Static Methods

static int GetNearestEdge (IList< Vector3 > polygon, Vector3 point, float maxDistance=Mathf.Infinity, int startEdgeIndex=0)
 Computes the edge of the given polygon which is nearest to the given point . More...
 
static int GetNearestEdge (IList< Vector3 > polygon, Vector3 point, int startEdgeIndex=0)
 Computes the edge of the given polygon which is nearest to the given point . More...
 
static Vector3 ProjectPointOnLine (Vector3 point, Vector3 start, Vector3 end, bool clamped=true)
 Projects a given point onto a line. More...
 
static void RoundZeroElements (ref Vector3 point)
 Rounds all elements of the given point to zero which are within the interval (- Mathf2.Epsilon, + Mathf2.Epsilon). More...
 
static Vector2 CartesianToSperical (Vector3 point)
 Converts the given point from cartesian coordinates into spherical coordinates ignoring the radius parameter that is assumed to be 1. More...
 
static Vector3 SphericalToCartesian (Vector2 point)
 Converts the given point from spherical coordinates into cartesian coordinates ignoring the radius parameter that is assumed to be 1. More...
 
static float MinElement (Vector3 vector)
 Returns the minimum element from a given Vector3. More...
 
static float MaxElement (Vector3 vector)
 Returns the maximum element from a given Vector3. More...
 
Imprint