Glare.Box4i.Random C# (CSharp) Method

Random() public method

Get a random position within the box.
public Random ( Random rng ) : Vector4i
rng System.Random
return Vector4i
        public Vector4i Random(Random rng )
        {
            Vector4i result;
                                    result.X = (Int32)(rng.NextDouble() * (Max.X - Min.X) + Min.X);
                                    result.Y = (Int32)(rng.NextDouble() * (Max.Y - Min.Y) + Min.Y);
                                    result.Z = (Int32)(rng.NextDouble() * (Max.Z - Min.Z) + Min.Z);
                                    result.W = (Int32)(rng.NextDouble() * (Max.W - Min.W) + Min.W);
                                return result;
        }

Same methods

Box4i::Random ( Random rng, Vector4i &result ) : void