Added forward declarations for functions
Cleared compiler warnings
 - explicitly cast double constants to float with "f" suffix
 - explicitly cast double result of arithmetic to float types
 - explicitly cast integer types and return values to float types
 - explicitly cast float types to integer types