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

◆ Clamp() [1/2]

static void Microsoft.Xna.Framework.Vector3.Clamp ( ref Vector3 value1,
ref Vector3 min,
ref Vector3 max,
out Vector3 result )
inlinestatic

Definition at line 291 of file Vector3.cs.

292 {
293 float x = value1.X;
294 x = ((x > max.X) ? max.X : x);
295 x = ((x < min.X) ? min.X : x);
296 float y = value1.Y;
297 y = ((y > max.Y) ? max.Y : y);
298 y = ((y < min.Y) ? min.Y : y);
299 float z = value1.Z;
300 z = ((z > max.Z) ? max.Z : z);
301 z = ((z < min.Z) ? min.Z : z);
302 result.X = x;
303 result.Y = y;
304 result.Z = z;
305 }