Skip to content

Commit ee6f48b

Browse files
committed
Fixed an incorrect usage of Math.abs() in Quaternion.calculateW() (thanks @qxzkjp).
1 parent 40ba9a2 commit ee6f48b

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44

55
### New Features
66

7-
* RenderTexture.resize will allow you to resize the underlying Render Texture to the new dimensions given. Doing this also clears the Render Texture at the same time (thanks @saqsun)
7+
* RenderTexture.resize will allow you to resize the underlying Render Texture to the new dimensions given. Doing this also clears the Render Texture at the same time (thanks @saqsun).
88
* Rectangle.RandomOutside is a new function that takes two Rectangles, `outer` and `inner`, and returns a random point that falls within the outer rectangle but is always outside of the inner rectangle.
99

1010
### Updates
1111

12-
* The ForwardDiffuseLightPipeline, used by the Lights system, now sets a flag if the Scene doesn't contain any lights. All of the Game Objects now check this flag and don't even bother adding themselves to the batch if there are no lights in the Scene, as they'd never render anyway. This also avoids the ghost-image problem if you swap Scenes to a new Scene with the Light Manager enabled, but no actual lights defined. Fix #3707 (thanks @samvieten)
12+
* The ForwardDiffuseLightPipeline, used by the Lights system, now sets a flag if the Scene doesn't contain any lights. All of the Game Objects now check this flag and don't even bother adding themselves to the batch if there are no lights in the Scene, as they'd never render anyway. This also avoids the ghost-image problem if you swap Scenes to a new Scene with the Light Manager enabled, but no actual lights defined. Fix #3707 (thanks @samvieten).
1313

1414
### Bug Fixes
1515

16-
* The Canvas RenderTexture drawImage method incorrectly set the values of the frame, causing them to appear wrongly scaled in the canvas renderer. Fix #3710 (thanks @saqsun)
17-
* Fixed `Matrix4.makeRotationAxis()`.
16+
* The Canvas RenderTexture drawImage method incorrectly set the values of the frame, causing them to appear wrongly scaled in the canvas renderer. Fix #3710 (thanks @saqsun).
17+
* Fixed `Math.Matrix4.makeRotationAxis()`.
18+
* Fixed an incorrect Math.abs in `Math.Quaternion.calculateW()` (thanks @qxzkjp).
1819

1920
## Version 3.9.0 - Yui - 24th May 2018
2021

src/math/Quaternion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ var Quaternion = new Class({
685685
var y = this.y;
686686
var z = this.z;
687687

688-
this.w = -Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
688+
this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);
689689

690690
return this;
691691
},

0 commit comments

Comments
 (0)