# Maths.PseudoRandom.RandomWithAvoidance class

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

```cs
public sealed class Maths.PseudoRandom.RandomWithAvoidance
```

A class for generating random values which are never too close to previously generated values.

## Constructors

- [Maths.PseudoRandom.RandomWithAvoidance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.randomwithavoidance/ctor.md): Create a new random sequence generator.

## Properties

- [Lower](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.randomwithavoidance/lower.md): Gets the lower limit for the random interval.
- [Upper](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.randomwithavoidance/upper.md): Gets the upper limit for the random interval.

## Methods

- [Next](https://developer.rhino3d.com/api/gh2/type/grasshopper2.maths.pseudorandom.randomwithavoidance/next.md): Get the next random sample. This method will return double.NaN if no sample could be found within the Lower/Upper range.
