more than one instance of overloaded function “round” matches the argument list: – function template “T round(T x)” (declared at line 57 of “/Users/Ryan/.particle/toolchains/deviceOS/3.1.0/wiring/inc/spark_wiring_constants.h”) – function template “__gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::round(_Tp __x)” (declared at line 1768 of “/Users/Ryan/.particle/toolchains/gcc-arm/10.2.1/arm-none-eabi/include/c++/10.2.1/cmath”) – argument types are: (int)C/C++(308)
What is the rationale of trying to round a number that already is rounded by definition?
Round only ever makes sense when your parameter is a floating point type.
Hence there is no definition of round() that takes any integer type.
Just a hint on that 3 / 2: This will always be calculated as 1. No matter whether you use round() or not.
A pure int division will always render an int result.
At least one of your parameters of the division operator needs to be a floating point type to render a floating point result.
Since a pure int can be treated as float, double or long double the compiler is unsure what to use.