fix: mentioned 'fract' instead of 'rand'

This commit is contained in:
Wojtek Pachowiak 2023-02-09 14:15:14 +01:00 committed by GitHub
parent b51726385b
commit be21e827d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ Now it's your turn:
![](02.png)
Now that we know how to do noise in 1D, it's time to move on to 2D. In 2D, instead of interpolating between two points of a line (```fract(x)``` and ```fract(x)+1.0```), we are going to interpolate between the four corners of the square area of a plane (```fract(st)```, ```fract(st)+vec2(1.,0.)```, ```fract(st)+vec2(0.,1.)``` and ```fract(st)+vec2(1.,1.)```).
Now that we know how to do noise in 1D, it's time to move on to 2D. In 2D, instead of interpolating between two points of a line (```rand(x)``` and ```rand(x)+1.0```), we are going to interpolate between the four corners of the square area of a plane (```rand(st)```, ```rand(st)+vec2(1.,0.)```, ```rand(st)+vec2(0.,1.)``` and ```rand(st)+vec2(1.,1.)```).
![](01.png)