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

add log2 polyfill #4701

Merged
merged 2 commits into from Jun 26, 2019

Conversation

@2youyou2
Copy link
Collaborator

commented Jun 25, 2019

Re: cocos-creator/2d-tasks#1563

Changes:

  • add log2 polyfill
@@ -8,6 +8,12 @@ if (!Math.sign) {
};
}

if (!Math.log2) {
Math.log2 = function (x) {
return Math.log(x) / 0.6931471805599453;

This comment has been minimized.

Copy link
@jareguo

jareguo Jun 26, 2019

Contributor

改成 Math.log(x) * Math.LOG2E 吧?

@jareguo jareguo merged commit ddec790 into cocos-creator:v2.1.2 Jun 26, 2019

1 check passed

ci/circleci: test Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.