# Randomize

Seeds the pseudo-random number generator with an integer number, ensuring repeatable number patterns.

## Method Signature

```
Randomize(seed=[numeric], algorithm=[string])
```

### Arguments

| Argument    | Type      | Required | Description                                         | Default |
| ----------- | --------- | -------- | --------------------------------------------------- | ------- |
| `seed`      | `numeric` | `true`   | The number to seed the Random with                  |         |
| `algorithm` | `string`  | `false`  | The algorithm to use to generate the random number. |         |

## Examples

### Tag Example

The following example calls the Randomize function to seed the random number generator and generates 10 random numbers.

```java
<bx:set randomize( 12345 ) > <!--- if one was to remove this line, the random numbers are different every time --->  
 <bx:loop index="i" from="1" to="10"> 
 <bx:output>#rand()#</bx:output> 
 </bx:loop> 
```

### Additional Examples

```java
writeDump( Randomize( 8, "SHA1PRNG" ) );
writeDump( Randomize( 10 ) >= 0 && Randomize( 10 ) <= 1 );
randomize( 55 );
bx:loop index="i" from="1" to="3" {
	writeDump( rand() );
}

```

## Related

* [Abs](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/abs)
* [Acos](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/acos)
* [Asin](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/asin)
* [Atn](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/atn)
* [Ceiling](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/ceiling)
* [Cos](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/cos)
* [DecrementValue](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/decrementvalue)
* [Exp](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/exp)
* [Fix](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/fix)
* [Floor](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/floor)
* [FormatBaseN](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/formatbasen)
* [IncrementValue](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/incrementvalue)
* [InputBaseN](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/inputbasen)
* [Int](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/int)
* [Log](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/log)
* [Log10](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/log10)
* [Max](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/max)
* [Min](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/min)
* [Pi](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/pi)
* [PrecisionEvaluate](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/precisionevaluate)
* [Rand](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/rand)
* [RandRange](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/randrange)
* [Round](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/round)
* [Sgn](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sgn)
* [Sin](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sin)
* [Sqr](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sqr)
* [Tan](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/tan)
