Created
May 26, 2010 23:25
-
-
Save alecmce/415218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ray:Ray3D = new Ray3D(0, 0, -140, 0, 0, 100); | |
var sphere:Sphere3D = new Sphere3D(40, 0, 0, 0); | |
var alpha:Number = sphere.intersectRay(ray); | |
trace(alpha); | |
// outputs 0.6428719030100183 | |
Okay, documentation isn't what it should be. Point taken. But, its open source, so guess you simply have to live with some limitations. Can understand your frustration though, sorry ;-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. The output is fine with a normalized vector. I've calmed down a bit now, though I'm going to have to work late because of the delay all this caused me, but I still really think that some documentation would be helpful in these circumstances. Take the matrix3D..copy(matrix3D):Matrix3D function. Which one is copied to which? Which one is returned? It's an absolutely fine and flexible API to have, but only if it's well documented. I feel like I code at less than half my normal pace just because documentation doesn't exist. As it happens, I don't document internal project code either, but I sure-as-hell document public APIs. Jeez indeed.