SyntaxFix
Write A Post
Hire A Developer
Questions
In C lang:
double truncKeepDecimalPlaces(double value, int numDecimals) { int x = pow(10, numDecimals); return (double)trunc(value * x) / x; }