Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

inverse modulus operator

$
0
0

I am converting four digits using the modulus operator. what I want to do is to convert them back to their original values.

	num_one = (digit_one + 7) % 10;
	num_two = (digit_two + 7) % 10;
	num_three = (digit_three + 7) % 10;
	num_four = (digit_four + 7) % 10;

Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>