Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
VectorExtensions Class Reference

Static Public Member Functions

static float BearingDegrees (this Vector3 v1, Vector3 v2, Vector3 upAxis)
 Returns an angle from -180� to 180� between this vectors and another, based on the up axis to tell left from right More...
 
static float BearingRadians (this Vector3 v1, Vector3 v2, Vector3 upAxis)
 Returns an angle from -PI to PI between this vectors and another, based on the up axis to tell left from right More...
 
static float HeadingDegrees (this Vector3 v1, Vector3 v2, Vector3 upAxis)
 Returns an angle from 0 to 360� between this vectors and another, based on the up axis to tell left from right More...
 
static float HeadingRadians (this Vector3 v1, Vector3 v2, Vector3 upAxis)
 Returns an angle from 0 to 2PI between this vectors and another, based on the up axis to tell left from right More...
 
static bool IsInvalid (this Vector3 v)
 Returns true iff at least one component is NaN or Infinity More...
 
static bool IsInvalid (this Vector2 v)
 
static bool IsInvalid (this Vector3d v)
 
static bool IsSmallerThan (this Vector3 v, float length=0.1f)
 Uses a sqrmag test to see if vector is smaller than a scalar length value More...
 
static bool IsSmallerThan (this Vector2 v, float length=0.1f)
 
static bool IsZero (this Vector3 v)
 Tests if all components are zero More...
 
static bool IsZero (this Vector2 v)
 
static void Zero (this Vector3 v)
 Zeros the vector More...
 
static void Zero (this Vector2 v)
 

Member Function Documentation

static float VectorExtensions.BearingDegrees ( this Vector3  v1,
Vector3  v2,
Vector3  upAxis 
)
inlinestatic

Returns an angle from -180� to 180� between this vectors and another, based on the up axis to tell left from right

Parameters
v1
v2
upAxis
Returns
static float VectorExtensions.BearingRadians ( this Vector3  v1,
Vector3  v2,
Vector3  upAxis 
)
inlinestatic

Returns an angle from -PI to PI between this vectors and another, based on the up axis to tell left from right

Parameters
v1
v2
upAxis
Returns
static float VectorExtensions.HeadingDegrees ( this Vector3  v1,
Vector3  v2,
Vector3  upAxis 
)
inlinestatic

Returns an angle from 0 to 360� between this vectors and another, based on the up axis to tell left from right

Parameters
v1
v2
upAxis
Returns
static float VectorExtensions.HeadingRadians ( this Vector3  v1,
Vector3  v2,
Vector3  upAxis 
)
inlinestatic

Returns an angle from 0 to 2PI between this vectors and another, based on the up axis to tell left from right

Parameters
v1
v2
upAxis
Returns
static bool VectorExtensions.IsInvalid ( this Vector3  v)
inlinestatic

Returns true iff at least one component is NaN or Infinity

Parameters
v
Returns
static bool VectorExtensions.IsInvalid ( this Vector2  v)
inlinestatic
static bool VectorExtensions.IsInvalid ( this Vector3d  v)
inlinestatic
static bool VectorExtensions.IsSmallerThan ( this Vector3  v,
float  length = 0.1f 
)
inlinestatic

Uses a sqrmag test to see if vector is smaller than a scalar length value

static bool VectorExtensions.IsSmallerThan ( this Vector2  v,
float  length = 0.1f 
)
inlinestatic
static bool VectorExtensions.IsZero ( this Vector3  v)
inlinestatic

Tests if all components are zero

static bool VectorExtensions.IsZero ( this Vector2  v)
inlinestatic
static void VectorExtensions.Zero ( this Vector3  v)
inlinestatic

Zeros the vector

static void VectorExtensions.Zero ( this Vector2  v)
inlinestatic

The documentation for this class was generated from the following file: