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
2D vector Math
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Sounds like you want Eigen - http://eigen.tuxfamily.org/index.php?title=Main_Page
thanx !
Now I need more sleepless nights.
Now I need more sleepless nights.
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
I have doubts : should I use float or long ?
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
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).
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).
Martin FLEURENT - Usine Developer - SDK maintainer
Who is online
Users browsing this forum: No registered users and 112 guests
