Always false float comparisons

Ethan Watson via Digitalmars-d digitalmars-d at puremagic.com
Tue May 17 00:47:58 PDT 2016


On Monday, 16 May 2016 at 14:32:55 UTC, Andrei Alexandrescu wrote:
> It is rare to need to actually compute the inverse of a matrix.

Unless you're doing game/graphics work ;-) 4x3 or 4x4 matrices 
are commonly used to represent transforms in 3D space in every 3D 
polygon-based rendering pipeline I know of. It's even a 
requirement for fixed-function OpenGL 1.x.

Video games - also known around here as "The Exception To The 
Rule".

(Side note: My own preference is to represent transforms as a 
quaternion and vector. Inverting such a transform is a simple 
matter of negating a few components. Generating a matrix from 
such a transform for rendering purposes is trivial compared to 
matrix inversion.)


More information about the Digitalmars-d mailing list