Recent changes to 2: Vector math ufunc/built-inshttps://sourceforge.net/p/pyopengl/feature-requests/2/2001-07-22T19:43:06ZVector math ufunc/built-ins2001-07-22T19:43:06Z2001-07-22T19:43:06ZMike C. Fletcherhttps://sourceforge.net/u/mcfletch/https://sourceforge.netd7555349056996d68d4ac6c2c3bbea8fbc7057e4<div class="markdown_content"><p>Would be useful to have cross-product, magnitude and <br />
normalise ufuncs (Numeric) that could take two <br />
vectors/arrays-of-vectors and perform calculations on <br />
the arrays. Would likely want:</p>
<p>cross( array, vec, [dest] )<br />
cross( vec, array, [dest] )<br />
cross( array, array, [dest] )<br />
normalise( array, [dest] )<br />
normalise( vec, [dest] )<br />
magnitude( vec )<br />
magnitude( array )</p>
<p>Where arrays are X by 3, vecs are 3 element <br />
sequences. Would be cool to also allow 4-element vecs <br />
(just taking the first three elements) for those cases <br />
where that's what you already have. 2-element vecs <br />
would be interesting from a completeness point of <br />
view, but I'm not sure how useful they'd be in the <br />
real world.</p>
<p>There are other useful functions, of course, I just <br />
can't think of them now.</p></div>