Recent

Author Topic: Inverse in Chipmunk  (Read 1993 times)

KMagic

  • Full Member
  • ***
  • Posts: 100
Inverse in Chipmunk
« on: September 02, 2014, 09:41:20 am »
What do m_inv ( inverse of mass) and i_inv (inverse of moment of inertia) of a body mean?

I have asked this question in Chipmunk Forum but nobody replies.

Thank you  :P

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: Inverse in Chipmunk
« Reply #1 on: September 02, 2014, 09:58:58 am »
The inverse of a number x is 1/x.

Laksen

  • Hero Member
  • *****
  • Posts: 755
    • J-Software
Re: Inverse in Chipmunk
« Reply #2 on: September 02, 2014, 10:08:41 am »
It's just used to precalculate the inverse of the mass and inertia, because the mass and inertia usually is only set once. A division is very slow to calculate, so multiplying with the inverse does the same much faster.

KMagic

  • Full Member
  • ***
  • Posts: 100
Re: Inverse in Chipmunk
« Reply #3 on: September 02, 2014, 11:42:31 am »
Many thanks.  ::)

 

TinyPortal © 2005-2018