You need to sign in to do that
Don't have an account?
Dhatri Nath Kodali
Need help in writing APEX Class with ModulusOperator having integer and double
public class MOperators { public void main() { integer x = 42 ; double y = 42.25 ; system.debug('x MOD 10 = ' + math.mod (x,10)); system.debug('y MOD 10 = ' + math.mod (y,10)); } }
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_math.htm
mod method takes two Long parameters.
Its MOD operation not support double .. please refer this link
Refer this link
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000g4nuQAA
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_math.htm
public static Integer mod(Integer integerValue1, Integer integerValue2)
public static Long mod(Long longValue1, Long longValue2)