Skip to content

Conversation

@Grimeh
Copy link
Contributor

@Grimeh Grimeh commented Jan 31, 2020

Fixes docs for pc.Vec3.normalize (plus some automatic line-ending normalisation, yay?)

I noticed that the Vec3.normalize docs are somewhat misleading:

Returns the specified 3-dimensional vector copied and converted to a unit vector.

Based on experience, the example code given, and having looked at the source, I know that normalize actually normalises the vector in place.

(Let me know if you don't want to include the line ending fixes in this PR, I'll remove those changes. Wasn't intentional, git was being "helpful")

I confirm I have signed the Contributor License Agreement.

@Grimeh
Copy link
Contributor Author

Grimeh commented Jan 31, 2020

Szevvy noticed the "should output" in the example code was wrong for a Vec3, have also fixed that.

@Grimeh
Copy link
Contributor Author

Grimeh commented Jan 31, 2020

Went ahead and did the same for Vec2 and Vec4

@willeastcott willeastcott merged commit 6f5e89e into playcanvas:master Jan 31, 2020
@willeastcott
Copy link
Contributor

Yeah, looks like the line endings in those files were inconsistent. Thanks for the PR!! 😄

TheJonRobinson added a commit to Mojiworks/playcanvas-engine that referenced this pull request Feb 23, 2020
* master: (31 commits)
  WebXR Input Sources (playcanvas#1873)
  Simplified constants definition in Math classes (playcanvas#1876)
  Improve batching to handle 8-bit and 32-bit index buffers (playcanvas#1872)
  Add particle start frame example to browser
  [FIX] Update WebXR examples to use latest enums (playcanvas#1870)
  [FIX] Add XRWebGLLayer to externs for Closure compiler (playcanvas#1869)
  update paths in the particle system start frame example (playcanvas#1868)
  add a animation start frame variable to the particle system which def… (playcanvas#1864)
  point cloud example using engine directly, and custom shader changing size and color of points (playcanvas#1867)
  WebXR Support (playcanvas#1834)
  Hardware Instancing fixes / sample (playcanvas#1846) (playcanvas#1856)
  [VERSION] v1.25.0-dev
  [RELEASE] v1.24.7
  Recompiled basis, now works on IE (playcanvas#1865)
  Small mesh cleanup (playcanvas#1866)
  [FIX] Revert memory-leak change (playcanvas#1862)
  [FIX] Flag model as immutable when it's added to a ModelComponent (playcanvas#1861)
  [FIX] Fix calculation of deprecated pc.MouseEvent#wheel (playcanvas#1859)
  [DOCS] Adjust Vec3.normalize docs to reflect behavior better (playcanvas#1849)
  pc.BatchManager.markGroupDirty is now public (playcanvas#1848)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants