How can I use floating point functions from a library?
The mathematical library math.h
contains trigonometric functions like sin()
. These functions are declared to operate on doubles. If you want to use the floating-point variant of, e.g., sin()
you have to explicitly call sinf()
. All the floating-point functions have the suffix f
.