David Given wrote:
I don't believe there's an easy way of doing 'ordinary' rounding; that is, 1.2 -> 1, 1.8 -> 2. In C, this is rint().
num >= 0 and math.floor(num+0.5) or math.floor(num-0.5) -- Shmuel
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル