36件ヒット
[1-36件を表示]
(0.025秒)
種類
- インスタンスメソッド (33)
- 特異メソッド (3)
キーワード
- ** (11)
- pow (22)
-
try
_ convert (3)
検索結果
先頭4件
-
Integer
# **(other) -> Numeric (9.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Integer
# pow(other) -> Numeric (9.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Integer
# pow(other , modulo) -> Integer (9.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Integer
. try _ convert(obj) -> Integer | nil (9.0) -
obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。
...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。
Integer ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。
@param obj 変換する任意のオブジェクト......@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。
//emlist[例][ruby]{
Integer.try_convert(1) # => 1
Integer.try_convert(1.25) # => 1
Integer.try_convert([]) # => nil
//}...