|
![](/i/fill.gif) |
One more thing: how do I do this as a function or macro?
I also think I was getting some strange debug codes which suggested I had an extra
#;
showing up. I honestly don't think I even know how to write a "function" macro
after reading the docs. I want to have my new 4d vlength macro be usable about 2 or
3 places, so I would like to avoid retyping the whole function again and again.
ALthough I've probably just now done more typing than I'm complaining about, it's
an inelegant and error-prone solution...
Ron Parker wrote:
> On Tue, 07 Sep 1999 11:03:46 -0400, Greg M. Johnson wrote:
> >Okay then, can you tell this quite ignorant user how to write a macro that
> >will compute the length of a 4d vector?
> >I know it's simply the square root of the sum of the squares of the individual
> >components.
> >I actually already tried it and think I ran into some error messages...
>
> I think you'll have to do something like
>
> sqrt( V.red*V.red+V.green*V.green+V.blue*V.blue+V.filter*V.filter )
>
> though I haven't tested it.
Post a reply to this message
|
![](/i/fill.gif) |