Basic diffuse mapping and gamma correction
This commit is contained in:
parent
2756d676f1
commit
4497cc7f68
4 changed files with 41 additions and 10 deletions
|
|
@ -13,7 +13,7 @@ double degrees_to_radians(double d)
|
|||
/* Returns a double in the range [0,1) */
|
||||
inline double random_double()
|
||||
{
|
||||
return rand() / RAND_MAX + 1.0;
|
||||
return rand() * (1.0 / RAND_MAX);
|
||||
}
|
||||
|
||||
/* Returns a double in the range [min,max) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue