Page 1 of 1

Posted: 06 May 2015, 22:35
by oli_lab
Hi !

is there a way to easilly do math directly on 2D vectors ?

for exemple multiply a vector by a scalar, add two vectors, normalize a vector ?

or should I do my own fonctions ?

thanx

Olivar

Posted: 07 May 2015, 14:02
by caco

Posted: 07 May 2015, 14:45
by 23fx23
looks cool! thx caco

Posted: 08 May 2015, 15:50
by oli_lab
thanx !

Now I need more sleepless nights.

Posted: 10 May 2015, 11:11
by oli_lab
I have doubts : should I use float or long ?

Posted: 10 May 2015, 11:39
by martignasse
try with float before all,

but it really depends of the purpose,
until your computation need long because of intermediate approximation and precision limit of the float format. but you'll know that only by trying with float before ;)

if it's 'only' to visually rotate a bunch of vectors, i don't see the need and extra memory of long.
DSP computation is another story and can benefit of long for intermediate result, even if the final number will be a float (as usine TPrecision is a float for now).