Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tiny % questjun

This topic is 6148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
4 mod 3 = 1

4 mod 5 = 4

6 mod 8 = 8

mod is modular division - remember grade school math well mod is just the remainder so

4 mod 3 is 1 remainder 1 so the answer is 1
4 mod 5 is 0 remainder 4 so the answer is 4
.
.
.

hope that helped


Smile, it won''t let you live longer, but it is funny when they die with a smile.

Share this post


Link to post
Share on other sites
ok thanks

btw:
if you have a &ref to array[0], and you want &ref to point at array[1] .. would this be the correct way to change it:

&( ref += 1 )

or... ?
im not getting any errors when i do it like that, but i get some weird results..

Share this post


Link to post
Share on other sites
You cannot do pointer arithmetic on a reference. There might be a tricky way to do it but the whole point of references forbids it

You should use a pointer instead.

Seeya
Krippy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!