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

◆ SmoothStep() [2/2]

static Vector4 Microsoft.Xna.Framework.Vector4.SmoothStep ( Vector4 value1,
Vector4 value2,
float amount )
inlinestatic

Definition at line 313 of file Vector4.cs.

314 {
315 amount = ((amount > 1f) ? 1f : ((amount < 0f) ? 0f : amount));
316 amount = amount * amount * (3f - 2f * amount);
317 Vector4 result = default(Vector4);
318 result.X = value1.X + (value2.X - value1.X) * amount;
319 result.Y = value1.Y + (value2.Y - value1.Y) * amount;
320 result.Z = value1.Z + (value2.Z - value1.Z) * amount;
321 result.W = value1.W + (value2.W - value1.W) * amount;
322 return result;
323 }
Vector4(float x, float y, float z, float w)
Definition Vector4.cs:49

References Microsoft.Xna.Framework.Vector4.W, Microsoft.Xna.Framework.Vector4.X, Microsoft.Xna.Framework.Vector4.Y, and Microsoft.Xna.Framework.Vector4.Z.