Re: [Algorithms] How to get 3dvector largest coordinate index?
Brought to you by:
vexxed72
From: Matt J <mjo...@gm...> - 2009-02-27 17:11:53
|
Ah, yeah. And !(y > x) is !(y <= x) e.g. x >= y i forgot to double negate in my head. > > > The max. > > That formula has more fabs than sense. A quick rewrite would be: > x = abs(v.x); y = abs(v.y); z = abs(v.z) > return (x < max(y,z)) << (z >= y) > > which is obviously correct. > > OG. > |