danishgoel / box2dweb

Automatically exported from code.google.com/p/box2dweb
0 stars 0 forks source link

b2Body.prototype.GetLinearVelocity() should not return a reference to the b2Body's data member #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The data member returned, m_linearVelocity, is an object so any changes to it ( 
such as GetLinearVelocity().Normalize() ) will alter the b2Body's data member 
directly. 

GetLinearVelocity() should return a copy of m_linearVelocity.

SetLinearVeloity() should be used to modify m_linearVelocity.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by svanderv...@gmail.com on 15 Sep 2011 at 2:59

GoogleCodeExporter commented 9 years ago

Original comment by Uli.He...@googlemail.com on 24 Apr 2012 at 4:29