From eea573d69183162f9d9970603d3755154d6a4a0d Mon Sep 17 00:00:00 2001
From: Nightcycle Studios <77173389+nightcycle@users.noreply.github.com>
Date: Sun, 4 Feb 2024 21:06:27 -0300
Subject: [PATCH] Updated tutorial
---
README.md | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 102386c..efc4a72 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,53 @@
# Usage
-```lua
-local noise = Noise.new(12345)
-local value = noise:Perlin(1, 2) -- a value from 0 to 1 (ish)
-```
-
## Random
+```lua
+local seed = 12356
+local x = 0.5
+local y = 0.25
+local noise = Noise.new(seed)
+local value = noise:Random(x,y) -- a value from 0 to 1 (ish)
+```
+
## Perlin
+```lua
+local seed = 12356
+local x = 0.5
+local y = 0.25
+local noise = Noise.new(seed)
+local value = noise:Perlin(x,y) -- a value from 0 to 1 (ish)
+```
+
## Worley / Cellular
+```lua
+local seed = 12356
+local x = 0.5
+local y = 0.25
+local noise = Noise.new(seed)
+local value = noise:Cellular(x,y) -- a value from 0 to 1 (ish)
+```
+
## Voronoi
+```lua
+local seed = 12356
+local x = 0.5
+local y = 0.25
+local noise = Noise.new(seed)
+local value = noise:Voronoi(x,y) -- a value from 0 to 1 (ish)
+```
+
# Benchmark
Each map was sampled 32 times, including math.noise, to determine how long each of them took. Some maps have built in optimizations for when only x and y are provided.