Angle between two vectors

Math | Sunday 28 September 2008 7:49 pm

Here’s the formula to get the angle between two vectors in 2D space.

vector2 diff = target - position;
float angle = atan2(diff.y, diff.x);
Please share:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Current
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • StumbleUpon
  • Twitter
  • Reddit
  • Technorati
  • Yahoo! Bookmarks

Homogeneous Notation

Math | Friday 26 September 2008 7:13 pm

When doing transformations you should use homogeneous notation of vectors and points.

A point is declared as p = (x,y,z,1)

A vector is declared as v = (x,y,z,0)

Please share:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Current
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • StumbleUpon
  • Twitter
  • Reddit
  • Technorati
  • Yahoo! Bookmarks
« Previous Page