• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: rounding to a multiple of x?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rounding to a multiple of x?


  • Subject: Re: rounding to a multiple of x?
  • From: Shaun Wexler <email@hidden>
  • Date: Wed, 19 May 2004 16:15:27 -0700

On May 19, 2004, at 8:47 AM, email@hidden wrote:

I can't seem to figure out how to roundup to a multiple of a number ie if i have 1149 and i want to round up to a multiple of 4 how would accomplish this? any direction would be great

int i = 1149;
int m = (i + 3) & ~3;
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >rounding to a multiple of x? (From: email@hidden)

  • Prev by Date: Re: mouseUp: not called in NSTableView subclass when mouseDown: is overridden
  • Next by Date: Re: How to sharpen image?
  • Previous by thread: Re: rounding to a multiple of x?
  • Next by thread: [newbie] looking for help for my 1st decent project
  • Index(es):
    • Date
    • Thread