<div dir="ltr"><div>> <span style="font-size:13px">CGRectIntegral</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">But that's conversion though, right? </span>That's part of what I find stressful. If I'm using Ints internally, I don't ever need to worry about getting wonky results because of floating point math.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 11:45 PM, John Randolph <span dir="ltr"><<a href="mailto:jcr@icloud.com" target="_blank">jcr@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Jan 6, 2016, at 11:38 PM, Charles Constant <<a href="mailto:charles@charlesism.com">charles@charlesism.com</a>> wrote:<br>
><br>
> > I can certainly think of situations where I might want integer based rectangles, sizes, and points.<br>
><br>
> I'm quite biased this week, because I spent *yesterday* writing a file for my project with "IntRect" "IntPoint" "IntSize" ad nauseam. It's not something I'm very thrilled to have as part of my Audio app - a lone file of geometric structs that aready exist if you use CGFloats, where I don't get the full implementation, etc. And previously, I've written code that I needed land on whole numbers, and the extra concern about finding the right options in Cocoa to do so just stressed me out.<br>
<br>
</span>FWIW, NSIntegralRect() and CGRectIntegral() do exist. Note their entirely different naming conventions. ;-)<br>
<br>
Would be much nicer to just use myRect.integralRect when I need to round it. Might also be nice to have myRect.roundedOut and myRect.roundedIn for a bit more control of which way the sides move.<br>
<br>
-jcr<br>
<br>
<br>
</blockquote></div><br></div>