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.cbrt -> Math.pow #6220

Merged
merged 3 commits into from Feb 14, 2018

Conversation

Projects
None yet
4 participants
@likangning93
Copy link
Contributor

likangning93 commented Feb 14, 2018

IE doesn't support Math.cbrt, which was causing point cloud 3D Tiles to fail.

@cesium-concierge

This comment has been minimized.

Copy link

cesium-concierge commented Feb 14, 2018

Signed CLA is on file.

@likangning93, thanks for the pull request! Maintainers, we have a signed CLA from @likangning93, so you can review this at any time.

⚠️ I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@lilleyse

This comment has been minimized.

Copy link
Contributor

lilleyse commented Feb 14, 2018

Nice fix.

@lilleyse lilleyse merged commit 1372cd1 into AnalyticalGraphicsInc:master Feb 14, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@lilleyse lilleyse deleted the likangning93:cbrt branch Feb 14, 2018

@@ -466,7 +466,7 @@ define([
// Typical use case is leaves, where lower estimates of interpoint distance might
// lead to underattenuation.
var sphereVolume = content._tile.contentBoundingVolume.boundingSphere.volume();
content._baseResolutionApproximation = Math.cbrt(sphereVolume / pointsLength);
content._baseResolutionApproximation = Math.pow(sphereVolume / pointsLength, 1/3); // IE doesn't support cbrt

This comment has been minimized.

Copy link
@mramato

mramato Feb 14, 2018

Member

@lilleyse To prevent this problem in the future, should we add CesiumMath.cbrt that does the right thing depending on if Math.cbrt is available? This way if the "native" cbrt is faster or more accurate we get the benefit as well.

Also, keeping with convention, these should be 1.0/3.0.

This comment has been minimized.

Copy link
@lilleyse

lilleyse Feb 14, 2018

Contributor

Opened #6222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.