The randomization methods take two Vector as parameters topLeft and bottomRight which are used to bound the generated random values.
On this page you can drag the topLeft and bottomRight vectors to
change the bounds as well as the v1 vector on which we call the .randomizeX, .randomizeY and .randomize methods. Each time
these vectors are changed, the page generates 10 vectors to show a sample of output of the methods.
You will notice that the results of .randomizeX all keep the same .y value as v1 but have a .x value between the .x properties
of topLeft and bottomRight.
Similarly the results of .randomizeY all keep the same .x value as v1 but have a .y value between the .y properties
of topLeft and bottomRight.
Finally, the results of .randomize are independent from the properties of v1 and only depend on the .x and .y properties of topLeft and bottomRight.
Inputv1topLeftbottomRightv1.randomizeX(topLeft, bottomRight)topLeftbottomRightrandom 1random 2random 3random 4random 5random 6random 7random 8random 9random 10Inputv1topLeftbottomRightv1.randomizeY(topLeft, bottomRight)topLeftbottomRightrandom 1random 2random 3random 4random 5random 6random 7random 8random 9random 10Inputv1topLeftbottomRightv1.randomize(topLeft, bottomRight)topLeftbottomRightrandom 1random 2random 3random 4random 5random 6random 7random 8random 9random 10