mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix cbrt example
Exponentiation has higher precedence than division.
This commit is contained in:
parent
32c39e2162
commit
d355a83ee8
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ In some cases the linter can detect code that is never executed, because all exe
|
|||
```lua
|
||||
function cbrt(v)
|
||||
if v >= 0 then
|
||||
return v ^ 1/3
|
||||
return v ^ (1/3)
|
||||
else
|
||||
error('cbrt expects a non-negative argument')
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue