Kerbal Space Program
1.12.4
|
Static Public Member Functions | |
static double | ACosh (double x) |
static double | ACoth (double x) |
static double | ACsch (double x) |
static double | AngleBetween (Vector3d v, Vector3d w) |
Get the angle between two vectors minimizing errors due to rounding. Note that the "sign" of the angle is lost (ie, 0..pi) More... | |
static bool | Approximately (double a, double b, double epsilon=Double.Epsilon) |
static double | ASech (double x) |
static double | ASinh (double x) |
static double | ATanh (double x) |
static int | BSPSolver (ref double v0, double dv, Func< double, double > solveFor, double vMin, double vMax, double epsilon, int maxIterations) |
Runs a root-finding algorithm looking for an input parameter which best fits the given problem More... | |
static int | BSPSolver (ref float v0, float dv, Func< float, float > solveFor, float vMin, float vMax, float epsilon, int maxIterations) |
Runs a root-finding algorithm looking for an input parameter which best fits the given problem More... | |
static double | Clamp (double value, double min, double max) |
static double | Clamp01 (double value) |
static double | ClampDegrees180 (double angle) |
static double | ClampDegrees360 (double angle) |
static double | ClampRadians (double angle) |
static double | ClampRadiansPI (double angle) |
static double | ClampRadiansTwoPI (double angle) |
static double | Coth (double x) |
static double | Csch (double x) |
static double | DegreesToRadians (double degrees) |
static double | Flatten (double z, double midPoint, double easing) |
static double | InverseLerp (double a, double b, double t) |
static bool | IsDivisible (int n, int byN) |
static bool | IsPowerOfTwo (int x) |
static double | Lerp (double a, double b, double t) |
static double | LerpUnclamped (double a, double b, double t) |
static double | Max (params double[] values) |
static T | MaxFrom< T > (Func< T, double > getValue, params T[] values) |
static T | MaxFrom< T > (Func< T, double > getValue, out double max, params T[] values) |
static T | MaxFrom< T > (Func< T, float > getValue, params T[] values) |
static T | MaxFrom< T > (Func< T, float > getValue, out float max, params T[] values) |
static double | Min (params double[] values) |
static T | MinFrom< T > (Func< T, double > getValue, params T[] values) |
static T | MinFrom< T > (Func< T, double > getValue, out double min, params T[] values) |
static T | MinFrom< T > (Func< T, float > getValue, params T[] values) |
static T | MinFrom< T > (Func< T, float > getValue, out float min, params T[] values) |
static double | RadiansToDegrees (double radians) |
static float | RoundToPlaces (float value, int decimalPlaces) |
static double | RoundToPlaces (double value, int decimalPlaces) |
static double | Sech (double x) |
static bool | SphereIntersection (double radius, Vector3d position, Vector3d velocity, out double time, bool later) |
Find the intersection time of a ray starting at position with the given velocity with a sphere with the given radius centered on the origin. More... | |
static bool | SphereIntersection (double radius, Vector3d position, Vector3d velocity, out Vector3d impact, bool later) |
Find the intersection of a ray starting at position with the given velocity with a sphere with the given radius centered on the origin. More... | |
static void | SwapValues (ref double a, ref double b) |
static float | WrapAround (float value, float min, float max) |
static double | WrapAround (double value, double min, double max) |
static int | WrapAround (int value, int min, int max) |
Public Attributes | |
const double | Deg2Rad = 0.017453292519943296d |
const double | Rad2Deg = 57.295779513082321d |
Static Public Attributes | |
static double | HalfPI = 1.5707963267948966192313216916398 |
static float | HalfPIf = 1.5707963267948966192313216916398f |
static float | RadPerSec2RPM = 60f / TwoPIf |
static float | RPM2RadPerSec = TwoPIf / 60f |
static double | TwoPI = 6.283185307179586476925286766559 |
static float | TwoPIf = 6.283185307179586476925286766559f |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Get the angle between two vectors minimizing errors due to rounding. Note that the "sign" of the angle is lost (ie, 0..pi)
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Runs a root-finding algorithm looking for an input parameter which best fits the given problem
v0 | In: initial guess, Out: converged result |
dv | initial test range |
solveFor | The problem to solve. Ideal solution must be == 0 |
vMin | A clamp on low end inputs |
vMax | A clamp on high end inputs |
epsilon | The minimum precision to solve for |
maxIterations | Limit on how many iterations may be run |
< Binary Space Partitioning Solver
< don't allow v0 to go into beyond limits by forcing such samples to be impossibly useless.
|
inlinestatic |
Runs a root-finding algorithm looking for an input parameter which best fits the given problem
v0 | In: initial guess, Out: converged result |
dv | initial test range |
solveFor | The problem to solve. Ideal solution must be == 0 |
vMin | A clamp on low end inputs |
vMax | A clamp on high end inputs |
epsilon | The minimum precision to solve for |
maxIterations | Limit on how many iterations may be run |
< Binary Space Partitioning Solver
< don't allow v0 to go into beyond limits by forcing such samples to be impossibly useless.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
'Flattens' a boundless value 0-x-Inf into 0-1 space, approaching 1 as x approaches infinity
see "http://graph.tk/?1/1-(1/((1/4x)^2+1))"
z | The source value |
midPoint | the point at which z return 0.5 |
easing | an easing in value. values greater than one cause x to accelerate towards the midpoint |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Find the intersection time of a ray starting at position with the given velocity with a sphere with the given radius centered on the origin.
|
inlinestatic |
Find the intersection of a ray starting at position with the given velocity with a sphere with the given radius centered on the origin.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
const double UtilMath.Deg2Rad = 0.017453292519943296d |
|
static |
|
static |
const double UtilMath.Rad2Deg = 57.295779513082321d |
|
static |
|
static |
|
static |
|
static |