Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.MyMath

Malware edited this page Dec 21, 2018 · 42 revisions

Index

MyMath Class

Namespace: VRageMath
Assembly: VRage.Math.dll

Fields

Member Description
static Vector3 Vector3One

Methods

Member Description
static void InitializeFastSin()
static float FastSin(float angle)
static float FastCos(float angle)
static float&nbsp;FastTanH(float&nbsp;x) Fast approximation of Hyperbolic tangent Max deviation is <3%
static float&nbsp;NormalizeAngle(float&nbsp;angle,&nbsp;float&nbsp;center)
static float&nbsp;ArcTanAngle(float&nbsp;x,&nbsp;float&nbsp;y) ArcTanAngle
static Vector3&nbsp;Abs(ref&nbsp;Vector3&nbsp;vector)
static Vector3&nbsp;MaxComponents(ref&nbsp;Vector3&nbsp;a,&nbsp;ref&nbsp;Vector3&nbsp;b) Return vector with each component max
static Vector3&nbsp;AngleTo(Vector3&nbsp;From,&nbsp;Vector3&nbsp;Location) AngleTo
static float&nbsp;AngleBetween(Vector3&nbsp;a,&nbsp;Vector3&nbsp;b)
static float&nbsp;CosineDistance(ref&nbsp;Vector3&nbsp;a,&nbsp;ref&nbsp;Vector3&nbsp;b)
static double&nbsp;CosineDistance(ref&nbsp;Vector3D&nbsp;a,&nbsp;ref&nbsp;Vector3D&nbsp;b)
static int&nbsp;Mod(int&nbsp;x,&nbsp;int&nbsp;m)
static long&nbsp;Mod(long&nbsp;x,&nbsp;int&nbsp;m)
static Vector3&nbsp;QuaternionToEuler(Quaternion&nbsp;Rotation) QuaternionToEuler
static Vector3&nbsp;ForwardVectorProjection(Vector3&nbsp;forwardVector,&nbsp;Vector3&nbsp;projectedVector) This projection results to initial velocity of non-engine objects, which parents move in some velocity We want to add only forward speed of the parent to the forward direction of the object, and if parent is going backward, no speed is added.
static BoundingBox&nbsp;CreateFromInsideRadius(float&nbsp;radius)
static Vector3&nbsp;VectorFromColor(byte&nbsp;red,&nbsp;byte&nbsp;green,&nbsp;byte&nbsp;blue) Calculates color from vector
static Vector4&nbsp;VectorFromColor(byte&nbsp;red,&nbsp;byte&nbsp;green,&nbsp;byte&nbsp;blue,&nbsp;byte&nbsp;alpha)
static float&nbsp;DistanceSquaredFromLineSegment(Vector3&nbsp;v,&nbsp;Vector3&nbsp;w,&nbsp;Vector3&nbsp;p) Return minimum distance between line segment v-w and point p.
static float&nbsp;Clamp(float&nbsp;val,&nbsp;float&nbsp;min,&nbsp;float&nbsp;max)

Clone this wiki locally