How to get % for double types

 

Hello friends,
Hope you are having a nice day.

I want to get the leftover from dividing a double value to another double value:
for example: a=b%c while b=8.5, c=3.0 then a=2.5;
But it looks that % function only accept integers and no doubles.
What is the solution?

Thank you in advance.

 

MathMod

Returns the real remainder after the division of two numbers

double  MathMod(
   double  value,      // dividend value
   double  value2      // divisor value
   );
MathMod - Math Functions - MQL4 Reference
MathMod - Math Functions - MQL4 Reference
  • docs.mql4.com
MathMod - Math Functions - MQL4 Reference
 
Fernando Carreiro #:

MathMod

Returns the real remainder after the division of two numbers


Greatly appreciated!