<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 15, 2016, at 12:22 PM, Stephen Canon &lt;<a href="mailto:scanon@apple.com" class="">scanon@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Apr 15, 2016, at 11:14 AM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">That said, I use M_PI_4 a lot because it's really handy for sample code. I'm one of the</div><div class="">outlier users whose use is not reflective of this quick check.</div></div></div></blockquote><br class=""></div><div style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">M_PI_2 and M_PI_4 are interesting cases; they date back to a time when compilers couldn’t be trusted to constant-fold computations like M_PI / 2. &nbsp;Since Swift quite reliably does this transformation, I would prefer to simply use the more explicit .pi / 2. &nbsp;How does that strike you as a user?</div><div style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">– Steve</div></div></blockquote></div><br class=""><div class="">I cannot really defend my use other than to say they are comfortable constants, ones that I read easily.&nbsp;</div><div class="">Should Swift eliminate them I do not believe my code would suffer beyond muscle memory. Newer&nbsp;</div><div class="">users don't necessarily resonate to them the same way, either.</div><div class=""><br class=""></div><div class="">I do think that adding both .pi and .π and using .π/4.0 would be the most&nbsp;readable expression of intent.</div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div></body></html>