Cleaned up the code and added XML documentation.
Switched from floats to doubles for all math operations.
Added for clamping.
Cleaned up code.
Switched from float to double for all mathematical operations.
Added Include.