What is really wrong with this?
public void changeElement(String isAdd, double Element, int timesBy, int lowCap) {
ran = Math.floor(Math.random()*timesBy)+lowCap;
if(isAdd == "+"){
if((Element + ran) > 100){
ran -= ((Element + ran)-100);
};
Element += ran;
}else{
if((Element - ran) < 0){
ran -= (ran - Element);
};
Element -= ran;
};
Elementi = (int)Element;
ranI = (int)ran;
}
I know the math works because i changed the 'Element' tag to the double i have been using so why does it not change the true double like its meant to.