Jump to content
  • Advertisement
Sign in to follow this  
fooman_69

[web] Determining if an ID is within a certain range

This topic is 3278 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

I have a page with a group of 7 thumbnails at the top. I'm not sure how to determine which 7 thumbnails to display. If the page ID is between 1 and 7, the first 7 thumbnails should display... if the ID is between 8 and 14, the next 7 will display. I'm not sure how to program this dynamically I guess. Any help is greatly appreciated!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by fooman_69
I have a page with a group of 7 thumbnails at the top.

I'm not sure how to determine which 7 thumbnails to display.
If the page ID is between 1 and 7, the first 7 thumbnails should display... if the ID is between 8 and 14, the next 7 will display.

I'm not sure how to program this dynamically I guess.

Any help is greatly appreciated!



numberToStartAt = floor(ID/7)+1; (the floor function may be inside a namespace in some languages, if you say what language you're using you can get more accurate help)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!