I wanted to know if the result of std::sqrtf
is exact if the value is actually squared.
int value = ...;
int root = (int)sqrtf((float)value); // is this safe?
Note that value
is integer and not always squared. in that case I want to truncate the result.