Yeah, sure, this guy can’t even do such a simple thing as normalizing vectors?
No, the math was not the problem, trust me ;)
I kept getting a vector with 2 nan components. Sadly I spent about 3 hours looking for the problem, thinking this could not be possible, until I realized, that the length was 0 in most cases…
So: Today I learned that the result of a division by 0 is nan.
… better late than never ;P
This post was imported from tumblr