int mVperAmp = 100; // use 100 for 20A Module and 66 for 30A ModuleThis is the all important conversion factor, which you obtain from the sensor data sheet. As the variable name suggests, it converts the sensor output reading in milliVolts to sensor current in Amperes.
As for the math, beware of unwanted truncation due to improper use of integer division.