Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vector / Logical Problem

Started by JollySheep May 25, 2002 at 2:39 PM 0 replies 500+ views
Original Post
JollySheep
JollySheep
I have a litte Vector Problem driving me nuts: 2 Vectors and the angle between them (1)(2) (2)(4) (2)(4) ------ = 18/324 this with cos -1 and I have 0 degrees which is 3*6 what i expected they are collinear. Now i normalize them and i have angle = (v1) *(v2) ---------- 1*1 <- omitted because 1*1 = 1 (1/3)(1/3) (2/3)(2/3)= some crap unequal 0 degrees after cos -1 (2/3)(2/3) could you tell me where my error is ?? is it logical or just typing ??? Thank you in advance Martin
VolkerG
VolkerG
1. case:
(1, 2, 2).(2, 4, 4) = 18
|(1, 2, 2)| = 3
|(2, 4, 4)| = 6

So cos a = 18/(3*6) = 1

2. case
leads to cos a = 1, too

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.