Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

2014-09-03から1日間の記事一覧

Ruby | Numeric | abs2

概要 Numeric#abs2 -> Numeric 詳細 絶対値の2乗を返却。 サンプルコード p -2.abs2 p 0.abs2 p 2.abs2 出力 $ ruby numeric_abs2.rb 4 0 4 参照 http://docs.ruby-lang.org/ja/2.0.0/method/Numeric/i/abs2.html