Create user defined mod method in MSD axapta


Create user defined mod method in axapta
There is no inbuilt function to get mod of two values to we can create our own function to get mod by following way.

 real UserDefinedMod(real x, real y)  
 {  
   ;  
   return (x - ((trunc(x / y) * y)));  
 }