1266件ヒット
[1201-1266件を表示]
(0.073秒)
ライブラリ
- ビルトイン (630)
-
cgi
/ html (564) -
json
/ add / complex (12) - matrix (24)
-
ripper
/ lexer (36)
クラス
- Bignum (3)
- Complex (540)
- Fixnum (3)
- Matrix (24)
- NilClass (12)
- Numeric (48)
-
Ripper
:: Lexer (36) - SignalException (24)
- String (12)
モジュール
-
CGI
:: HtmlExtension (564)
キーワード
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (12)
-
/ (12) - < (12)
- <= (12)
- <=> (6)
- == (12)
- > (12)
- >= (12)
- a (24)
- abs (12)
- abs2 (12)
- angle (12)
- arg (12)
- base (12)
- between? (12)
- blockquote (24)
- caption (24)
- checkbox (24)
-
checkbox
_ group (24) - clamp (12)
- coerce (12)
- conj (12)
- conjugate (12)
- denominator (12)
- fdiv (30)
-
file
_ field (24) - finite? (9)
- form (48)
- hidden (24)
- html (24)
- i (12)
- imag (12)
- imaginary (12)
- img (24)
- infinite? (9)
- inspect (12)
- magnitude (12)
-
marshal
_ dump (12) -
multipart
_ form (48) - numerator (12)
- parse (12)
-
password
_ field (24) - phase (12)
- polar (12)
- quo (24)
-
radio
_ group (24) - rationalize (24)
- real (12)
- real? (12)
- rect (12)
- rectangular (12)
- reset (24)
-
scrolling
_ list (24) - signm (12)
- signo (12)
- submit (24)
-
text
_ field (24) - textarea (24)
-
to
_ c (48) -
to
_ f (12) -
to
_ i (12) -
to
_ json (12) -
to
_ r (12) -
to
_ s (12) - tokenize (12)
- tr (12)
- trace (12)
検索結果
先頭5件
-
NilClass
# to _ c -> Complex (101.0) -
0+0i を返します。
0+0i を返します。
//emlist[例][ruby]{
nil.to_c # => (0+0i)
//} -
Numeric
# fdiv(other) -> Float | Complex (101.0) -
self を other で割った商を Float で返します。 ただし Complex が関わる場合は例外です。 その場合も成分は Float になります。
...self を other で割った商を Float で返します。
ただし Complex が関わる場合は例外です。
その場合も成分は Float になります。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@param other 自身を割る......数を指定します。
//emlist[例][ruby]{
1.fdiv(3) #=> 0.3333333333333333
Complex(1, 1).fdiv 1 #=> (1.0+1.0i)
1.fdiv Complex(1, 1) #=> (0.5-0.5i)
//}
@see Numeric#quo... -
Numeric
# i -> Complex (101.0) -
Complex(0, self) を返します。
...Complex(0, self) を返します。
ただし、Complex オブジェクトでは利用できません。
//emlist[例][ruby]{
10.i # => (0+10i)
-10.i # => (0-10i)
(0.1).i # => (0+0.1i)
Rational(1, 2).i # => (0+(1/2)*i)
//}... -
Numeric
# quo(other) -> Rational | Float | Complex (101.0) -
self を other で割った商を返します。 整商を得たい場合は Numeric#div を使ってください。
...を返すことを意図しています。
具体的には有理数の範囲に収まる計算では Rational の値を返します。
Float や Complex が関わるときはそれらのクラスになります。
Numeric のサブクラスは、このメソッドを適切に再定義しなけれ......am other 自身を割る数を指定します。
//emlist[例][ruby]{
1.quo(3) #=> (1/3)
1.0.quo(3) #=> 0.3333333333333333
1.quo(3.0) #=> 0.3333333333333333
1.quo(0.5) #=> 2.0
Complex(1, 1).quo(1) #=> ((1/1)+(1/1)*i)
1.quo(Complex(1, 1)) #=> ((1/2)-(1/2)*i)
//}
@see Numeric#fdiv... -
Numeric
# to _ c -> Complex (101.0) -
自身を複素数 (Complex) に変換します。Complex(self, 0) を返します。
...自身を複素数 (Complex) に変換します。Complex(self, 0) を返します。
//emlist[例][ruby]{
1.to_c # => (1+0i)
-1.to_c # => (-1+0i)
1.0.to_c # => (1.0+0i)
Rational(1, 2).to_c # => ((1/2)+0i)
//}
Numeric のサブクラスは、このメソッド... -
String
# to _ c -> Complex (101.0) -
自身を複素数 (Complex) に変換した結果を返します。
...自身を複素数 (Complex) に変換した結果を返します。
以下の形式を解析できます。i、j は大文字、小文字のどちらでも解析できます。
* 実部+虚部i
* 実部+虚部j
* 絶対値@偏角
それぞれの数値は以下のいずれかの形式で指...