0

how can i make cross product between two vector in Tinyos (nesC)?

if i have position=p1+x*ex+y*ey;; where ex,ey: are vector.

i am searching for that but couldn't find any thing helped !!!

so is there any helpful way to do this ? if i go to the definition of cross product there is angle which i don't now how to get it from the two vector ?

Hana90
  • 943
  • 5
  • 17
  • 37

1 Answers1

0

if you have two vectors a and b (a = (a1, a2, a3) and b = (b1, b2, b3)) then cross product can be computed using following formula:

a x b = (a2*b3 - a3*b2, a3*b1 - a1*b3, a1*b2 - a2*b1)

IvanR
  • 533
  • 4
  • 23
  • if the two vector from two components? (a1,a2) ? – Hana90 Apr 25 '13 at 17:11
  • [Here](http://stackoverflow.com/questions/243945/calculating-a-2d-vectors-cross-product) is another question that has a good explanation regarding 2d case. – IvanR Apr 25 '13 at 18:31