# RandomExtensionMethods class

Namespace: [Grasshopper2.Extensions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.extensions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class RandomExtensionMethods
```

Provides extension methods for the Random class.

## Methods

- [CreateByteArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/createbytearray.md): (static) Create an array of random bytes.
- [CreateDoubleArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/createdoublearray.md): (2 overloads, static) Create an array of random 64-bit floats.
- [CreateIntegerArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/createintegerarray.md): (2 overloads, static) Create an array of random 32-bit integers.
- [NextBool](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextbool.md): (static) Generate a random boolean value.
- [NextColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextcolour.md): (static) Generate a random colour.
- [NextDouble](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextdouble.md): (static) Generate a double in the given interval.
- [NextPointInUnitSphere](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextpointinunitsphere.md): (static) Create a random, three-dimensional point inside the unit-sphere.
- [NextPointOnUnitDisc](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextpointonunitdisc.md): (static) Create a random, three-dimensional point on the unit disc.
- [NextUnitVector2D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextunitvector2d.md): (static) Create a random, two-dimensional unit vector.
- [NextUnitVector3D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/nextunitvector3d.md): (static) Create a random, three-dimensional unit vector.
- [Pick<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/pick.md): (static) Pick a random element from an array.
- [ToColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.randomextensionmethods/tocolour.md): (static) Create the colour associated with a distribution.
