るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.011秒)
トップページ > バージョン:2.2.0[x] > クエリ:*[x] > ライブラリ:cmath[x]

別のキーワード

  1. _builtin *
  2. matrix *
  3. array *
  4. vector *
  5. bigdecimal *

モジュール

キーワード

検索結果

CMath.#cos!(x) -> Float (61.0)

実数 x の余弦関数の値を返します。Math.#cos のエイリアス です。

...に発生します。

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
require "cmath"
CMath
.cos!(0 * Math::PI / 4) # => 1.0
CMath
.cos!(1 * Math::PI / 4) # => 0.7071067811865476
CMath
.cos!(4 * Math::PI / 4) # => -1.0
//}

@see Math.#cos...

CMath.#sin!(x) -> Float (61.0)

実数 x の正弦関数の値を返します。Math.#sin のエイリアス です。

...に発生します。

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
require "cmath"
CMath
.sin!(0 * Math::PI / 4) # => 0.0
CMath
.sin!(1 * Math::PI / 4) # => 0.7071067811865475
CMath
.sin!(2 * Math::PI / 4) # => 1.0
//}

@see Math.#sin...

CMath.#tan!(x) -> Float (61.0)

実数 x の正接関数の値を返します。Math.#tan のエイリアス です。

...定した場合に発生します。

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
require "cmath"
CMath
.tan!(0 * Math::PI / 4) # => 0.0
CMath
.tan!(1 * Math::PI / 4) # => 1.0
CMath
.tan!(4 * Math::PI / 4) # => 0.0
//}

@see Math.#tan...