Barycentric

Description
This is a simple helper struct to handle barycentric coordinates. It has a similar structure as the Vector3 struct as it also consists of 3 float values. However it provides a constructor that allows the calculation based on the 3 corners of a triangle and a reference point. It also provides a property to do an inside / outside test as well as an Interpolate method to easily use the coordinates to interpolate Vector 2 / 3 / 4 or Color values.

Usage / Examples
"normal" would be the interpolated normal at "point" on the triangle

Usage UnityScript (JavaScript)
To use this struct from UnityScript you need to place the "Barycentric.cs" file inside a folder called "plugins" or "Standard Assets". The actual usage is actually the same as in C#