Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math.pow is not bad practice. #3

Open
geon opened this issue Oct 25, 2022 · 1 comment
Open

Math.pow is not bad practice. #3

geon opened this issue Oct 25, 2022 · 1 comment

Comments

@geon
Copy link
Member

geon commented Oct 25, 2022

Since we use Prettier, which removes all redundant parentheses, using ** instead of Math.Pow is often less readable.

Compare

state.zoom * Math.pow(1.1, action.delta / 120)

with

state.zoom * 1.1 ** (action.delta / 120)
geon added a commit that referenced this issue Oct 25, 2022
Math.pow is not a bad practice.
@jonaskello
Copy link
Member

Should we standardize on Math.pow() then and disallow ** or should a mix be allowed? I think consistency is good so in my mind we should avoid a mix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants