diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 12247f6f8c94..3d01ee2bd758 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -1741,7 +1741,7 @@ define([ var projectionMatrix = camera.frustum.projectionMatrix; var x = camera.positionWC.y; - var eyePoint = Cartesian3.fromElements(Math.sign(x) * maxCoord.x - x, 0.0, -camera.positionWC.x, scratch2DViewportEyePoint); + var eyePoint = Cartesian3.fromElements(CesiumMath.sign(x) * maxCoord.x - x, 0.0, -camera.positionWC.x, scratch2DViewportEyePoint); var windowCoordinates = Transforms.pointToGLWindowCoordinates(projectionMatrix, viewportTransformation, eyePoint, scratch2DViewportWindowCoords); windowCoordinates.x = Math.floor(windowCoordinates.x); diff --git a/Source/Scene/SceneTransforms.js b/Source/Scene/SceneTransforms.js index c09122cd9ef4..907161bb4abe 100644 --- a/Source/Scene/SceneTransforms.js +++ b/Source/Scene/SceneTransforms.js @@ -126,7 +126,7 @@ define([ var projectionMatrix = camera.frustum.projectionMatrix; var x = camera.positionWC.y; - var eyePoint = Cartesian3.fromElements(Math.sign(x) * maxCoord.x - x, 0.0, -camera.positionWC.x); + var eyePoint = Cartesian3.fromElements(CesiumMath.sign(x) * maxCoord.x - x, 0.0, -camera.positionWC.x); var windowCoordinates = Transforms.pointToGLWindowCoordinates(projectionMatrix, viewportTransformation, eyePoint); if (x === 0.0 || windowCoordinates.x <= 0.0 || windowCoordinates.x >= canvas.clientWidth) {