3d Math functions

Author
Bit Barrel Media

Description
This is a collection of generic 3d math functions such as line plane intersection, closest points on two lines, etc.

Usage
-Place the Math3d.cs script in the scripts folder.

-To call a function from another script, place "Math3d." in front of the function, for example: Math3d.LookRotationExtended

-If you want to use the TransformWithParent function, you have to call Math3d.Init first.

-Make sure all input vectors are normalized.

Forum
http://forum.unity3d.com/threads/3d-math-functions.126575/

Performance
The Unity and 3dMath functions are optimized for readability, not for performance. If you need to call one or more of these functions thousands of times per frame, convert the code as described below. It can lead to several orders of magnitude in performance increase, depending how often you do mathematical operations.

Categories
3d Math