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
Merged

add log2 polyfill #4701

merged 2 commits into from Jun 26, 2019

Conversation

@2youyou2
Copy link
Contributor

@2youyou2 2youyou2 commented Jun 25, 2019

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

Changes:

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

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

@jareguo jareguo Jun 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Loading

@jareguo jareguo merged commit ddec790 into cocos-creator:v2.1.2 Jun 26, 2019
1 check passed
Loading
@2youyou2 2youyou2 deleted the v2.1.2-log2 branch Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants