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

◆ Clamp() [2/2]

static Vector3 Microsoft.Xna.Framework.Vector3.Clamp ( Vector3 value1,
Vector3 min,
Vector3 max )
inlinestatic

Definition at line 273 of file Vector3.cs.

274 {
275 float x = value1.X;
276 x = ((x > max.X) ? max.X : x);
277 x = ((x < min.X) ? min.X : x);
278 float y = value1.Y;
279 y = ((y > max.Y) ? max.Y : y);
280 y = ((y < min.Y) ? min.Y : y);
281 float z = value1.Z;
282 z = ((z > max.Z) ? max.Z : z);
283 z = ((z < min.Z) ? min.Z : z);
284 Vector3 result = default(Vector3);
285 result.X = x;
286 result.Y = y;
287 result.Z = z;
288 return result;
289 }
Vector3(float x, float y, float z)
Definition Vector3.cs:66

References Microsoft.Xna.Framework.Vector3.X, Microsoft.Xna.Framework.Vector3.Y, and Microsoft.Xna.Framework.Vector3.Z.

Referenced by Microsoft.Xna.Framework.BoundingBox.Contains(), Microsoft.Xna.Framework.BoundingBox.Contains(), Microsoft.Xna.Framework.BoundingSphere.Intersects(), Microsoft.Xna.Framework.BoundingBox.Intersects(), Microsoft.Xna.Framework.BoundingSphere.Intersects(), Microsoft.Xna.Framework.BoundingBox.Intersects(), Terraria.Initializers.UILinksInitializer.Load(), and Terraria.GameContent.UI.States.UICharacterCreation.RgbToScaledHsl().