Skip to content

Instantly share code, notes, and snippets.

@Marzogh
Last active May 23, 2016 23:28
Show Gist options
  • Save Marzogh/1cc67d172b9344ea331974df4e9df85a to your computer and use it in GitHub Desktop.
Save Marzogh/1cc67d172b9344ea331974df4e9df85a to your computer and use it in GitHub Desktop.
Calculates change between numbers
int getValueChange(int currVal, int lastVal) {
if (currVal > lastVal) {
return (currVal - lastVal);
} else {
int dec = -(lastVal - currVal);
return dec;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment