I disagree: in English, the nouns are floor and ceiling. That&#39;s what they should be called.<br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 27, 2016 at 02:41 David Hart &lt;<a href="mailto:david@hartbit.com">david@hartbit.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Whatever the naming scheme, I would be hesitant to have the non-mutating versions of floor and ceil have different endings, seeing how connected they are. So:</div><div><br></div><div>floor, ceil </div><div>floored, ceiled </div><div>flooring, ceiling</div><div><br></div><div>But not a mix.</div></div><div dir="auto"><div><br>On 27 Jun 2016, at 07:13, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">On Mon, Jun 27, 2016 at 12:45 AM, Charlie Monroe via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Given the API guidelines, it should be<div><br></div><div>rounded, ceiled, floored </div><div><br></div><div>for returning the rounded/ceiled/floored value and</div><div><br></div><div>round(), ceil(), floor()</div><div><br></div><div>would be the mutating variants. Question is where it&#39;s not too confusing for anyone knowing these from another language.</div></div></blockquote><div><br></div><div>Although colloquially they can be &quot;verbed,&quot; ceil[ing] and floor are formally nouns, just like sine, union, etc. So the API guidelines would recommend: `rounded`, `ceiling`, `floor` for the non-mutating version and `round`, `formCeiling`, and `formFloor` for the mutating version.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div><br><div><blockquote type="cite"><div>On Jun 25, 2016, at 9:02 PM, Remy Demarest via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div>We don&#39;t seem to have a rounded() function either as part of FloatingPoint, we should probably have these methods in the end:</div><div><br></div><div>func rounded() -&gt; Self</div><div>func rounded(withPrecision: Int) -&gt; Self</div><div><br></div><div>Along with the 4 other methods proposed below.</div><br><div><blockquote type="cite"><div>Le 25 juin 2016 à 11:55, Haravikk via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; a écrit :</div><br><div><div style="word-wrap:break-word"><div><br></div><div><blockquote type="cite"><div>On 25 Jun 2016, at 11:06, Karl via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><div><div style="word-wrap:break-word"><div><br><ul style="padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)"><li><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">floor()</code> and <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">ceil()</code>, exactly like C. <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">ceiling()</code> is more descriptive and is a <a href="http://mathworld.wolfram.com/CeilingFunction.html" style="color:rgb(64,120,192);text-decoration:none" target="_blank">mathematical term of art</a>.</li><li><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">nextIntegralUp()</code> and <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">nextIntegralDown()</code> are more descriptive still, but possibly misleading as <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">(4.0).nextIntegralUp() == 4.0</code></li></ul></div></div></div></blockquote>I&#39;m in favour of these capabilities being there, but in terms of naming I&#39;ve often wondered why it can&#39;t just be part of a rounding group of methods like so:</div><div><br></div><div><font face="Monaco"><span style="white-space:pre-wrap">        </span>func roundedUp() -&gt; Self { … }</font></div><div><font face="Monaco"><span style="white-space:pre-wrap">        </span>func roundedUp(withPrecision:Int) -&gt; Self { … }</font></div><font face="Monaco"><span style="white-space:pre-wrap">        </span>func roundedDown() -&gt; Self { … }</font><div><font face="Monaco"><span style="white-space:pre-wrap">        </span>func roundedDown(withPrecision:Int) -&gt; Self { … }</font></div><div><br></div><div>Since the methods with implied precision of zero are equivalent to floor and ceiling surely? I know floor and ceiling are pretty common terms, but they&#39;re just a form rounding when it comes down to it.</div></div>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></blockquote></div>