Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Hermite() [1/3]

static double ReLogic.Utilities.Vector2D.Hermite ( double value1,
double tangent1,
double value2,
double tangent2,
double amount )
inlinestatic

Definition at line 432 of file Vector2D.cs.

433 {
434 double num = amount * amount * amount;
435 double num2 = amount * amount;
436 if (Math.Abs(amount) <= DoubleEpsilon)
437 {
438 return value1;
439 }
440 if (amount == 1.0)
441 {
442 return value2;
443 }
444 return (2.0 * value1 - 2.0 * value2 + tangent2 + tangent1) * num + (3.0 * value2 - 3.0 * value1 - 2.0 * tangent1 - tangent2) * num2 + tangent1 * amount + value1;
445 }
static double Abs(double value)
static readonly double DoubleEpsilon
Definition Vector2D.cs:22

References System.Math.Abs(), and ReLogic.Utilities.Vector2D.DoubleEpsilon.