Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Quaternion angle with itself > 0.001

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
20 replies to this topic

#21 Álvaro   Members   

20912
Like
0Likes
Like

Posted 13 August 2014 - 11:30 AM

You can also compute the angle between quaternions using
  dot_product = dot4(qa, qb);
  dot_product_squared = dot_product * dot_product;
  denominator = dot4(qa, qa) * dot4(qb, qb);
  return 2.0f * acos(sqrt(abs(dot_product_squared / denominator)));
I haven't tried it, so there could be mistakes. The idea is to not rely on the inputs being normalized, and write the expression in such a way that you are guaranteed to get exactly 0 if you qa==qb.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.