forums

TNT Basic Forums > Bugs!
i dont get it!
< Last Thread     Next Thread >
Author
Thread        Post A Reply

05-21-2003 19:42

Posted by:
bobwilliams

Click Here to Email bobwilliams   Find more posts by bobwilliams

Hi,
I dont think this is a bug exactly but i just dont understand it. Basically, i've got two vectors and i calculate their cross product to get the normal vector.
Simple eh? But it doesnt work for the following 2 vectors, or am i doing something wrong.

v1 = {-0.5 , 1 , 0}
v2 = {-0.129682 , 0 , -0.610105}

i get {0.610105 , -0.3050525 , -0.129682} as the unnormalized answer.

It is completely wrong. I just cannot see what i'm doing wrong. can anyone help me out? I would really appreciate it.

Bob

05-21-2003 23:16

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

simply because TNT does not have array operations, not even that nice way of writing

v1={7,5,9}

05-22-2003 21:51

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

write :

float var[5]

var[0]=1.5
var[1]=2
var[2]=2.4
var[3]=4.3
etc.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.