29 Jul '13, 9am

名前で揉めた結果Numeric#withinだかlimitだかclipだかclampだかが入らなかった様子を見ている

Issue #4574 has been updated by Kenta Murata. I like Numeric#limit and/or Numeric#clip. I think "limit" is more mathematical, and "clip" is more easy to understand its functionality from its name. So I believe it is acceptable that the both names are provided. In contrast, I feel that Numeric#within returns boolean so I don't want to accept it. ---------------------------------------- Feature #4574: Numeric#within http://redmine.ruby-lang.org/issues/4574 Author: Yusuke Endoh Status: Open Priority: Normal Assignee: Yukihiro Matsumoto Category: Target version: 1.9.3 Hello, Many people have written programs that limits an integer/float within a range like: v = [[v, min].max, max].min or v = v < min ? min : (v < max ? v : max) or if v < min v = min elsif max < v v = max end . But these are all too complex in spite of frequent idiom. "[min, v, max].sort[1]" is cool, but slightl...

Full article: https://www.ruby-forum.com/topic/1490115

Tweets

Feature Your Bitcoin Related Business #bitcoin

Feature Your Bitcoin Related Business #bitcoin

bitcoinmagazine.com 26 Jul '13, 5pm

Bitcoin Magazine would like to thank the movers and shakers in the Bitcoin community who are taking steps to proactively i...

Special feature: The Black Swan, Helmsley, North Yorkshire, UK

Special feature: The Black Swan, Helmsley, Nort...

aluxurytravelblog.com 29 Jul '13, 3pm

As well as this beautiful former Cistercian abbey, there are lots of other things to see and do in the area. Nearby is the...