Added a comment explaining what and why. Also added a couple of explicit cast to make compiler whine less (double to float mostly).
Added a comment explaining what and why. Also added a couple of explicit cast to make compiler whine less (double to float mostly).