> For the complete documentation index, see [llms.txt](https://unity.progdocs.se/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unity.progdocs.se/grundfunktioner/slump.md).

# Slump

Slump i Unity fungerar lite annorlunda än i vanlig C#.

### Random.Range <a href="#h.p_9y2btum-ch5y" id="h.p_9y2btum-ch5y"></a>

```csharp
float slumptal = Random.Range(0f, 5f) // Slumpar ett decimaltal mellan 0 och 5
int slumptal2 = Random.Range(0, 5) // Slumpar ett heltal mellan 0 och 5
```
