identifying the component of a vector

50 views
Skip to first unread message

jmlopez...@gmail.com

unread,
Mar 12, 2021, 7:21:24 AM3/12/21
to basilisk-fr
Hello,

Given a scalar s doing

  assert( s.v.x.i >= 0);
  vector u = s.v;

I can check  that s belong to a vector u and retrieve the vector but,  how could find which component is ?

Thanks in advance!

Jose

for the moment I will do if(s.i ==u.x.i) ... else if (s.i == u.y.i)  but I wonder  it would be a better procedure....
Reply all
Reply to author
Forward
0 new messages