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 3 commits into from Feb 14, 2018


None yet
4 participants
Copy link

likangning93 commented Feb 14, 2018

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


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 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 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.

🌍 🌎 🌏


This comment has been minimized.

Copy link

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

@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 Feb 14, 2018


@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 Feb 14, 2018


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.