Welcome to %s forums

BrainModular Users Forum

Login Register

2D vector Math

Create your own modules in C++
Post Reply
User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 06 May 2015, 22:35

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
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


23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 07 May 2015, 14:45

looks cool! thx caco

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 08 May 2015, 15:50

thanx !

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

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 10 May 2015, 11:11

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

martignasse
Site Admin
Posts: 611
Location: Lyon, FRANCE
Contact:

Unread post by martignasse » 10 May 2015, 11:39

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).
Martin FLEURENT - Usine Developer - SDK maintainer

Post Reply

Who is online

Users browsing this forum: No registered users and 112 guests