Skip to content

Commit

Permalink
fix compilation with V from vlang/v#16123
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Oct 20, 2022
1 parent 9afeca6 commit cbbbfdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noise/perlin.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct Vec2 {

[inline]
fn random_gradient() ?Vec2 {
nr := rand.f32_in_range(0.0, math.pi * 2)?
nr := rand.f32_in_range(0.0, math.pi * 2) or { return err }
return Vec2{
x: math.cosf(nr)
y: math.sinf(nr)
Expand Down

0 comments on commit cbbbfdf

Please sign in to comment.