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

◆ Hermite() [2/2]

static Vector4 Microsoft.Xna.Framework.Vector4.Hermite ( Vector4 value1,
Vector4 tangent1,
Vector4 value2,
Vector4 tangent2,
float amount )
inlinestatic

Definition at line 357 of file Vector4.cs.

358 {
359 float num = amount * amount;
360 float num2 = amount * num;
361 float num3 = 2f * num2 - 3f * num + 1f;
362 float num4 = -2f * num2 + 3f * num;
363 float num5 = num2 - 2f * num + amount;
364 float num6 = num2 - num;
365 Vector4 result = default(Vector4);
366 result.X = value1.X * num3 + value2.X * num4 + tangent1.X * num5 + tangent2.X * num6;
367 result.Y = value1.Y * num3 + value2.Y * num4 + tangent1.Y * num5 + tangent2.Y * num6;
368 result.Z = value1.Z * num3 + value2.Z * num4 + tangent1.Z * num5 + tangent2.Z * num6;
369 result.W = value1.W * num3 + value2.W * num4 + tangent1.W * num5 + tangent2.W * num6;
370 return result;
371 }
Vector4(float x, float y, float z, float w)
Definition Vector4.cs:49