💬

Community answer

Collected from the ACE community Discord archive around 2021-03-01. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Bitflags: pow(2,n) equals 1<<n

🌙 LuaUpdated 2 days ago•0 views
pow(2,n) == 1<<n - source engine enums/flags are bitflags, so combining flags uses bitwise ops not arithmetic power.

Relation between pow(2,n), 2^n and bit shifting

pow(2,n) == 1<<n - source engine enums/flags are bitflags, so combining flags uses bitwise ops not arithmetic power.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.