るりまサーチ

最速Rubyリファレンスマニュアル検索!
957件ヒット [901-957件を表示] (0.194秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< < ... 8 9 10 >>

Complex.polar(r, theta = 0) -> Complex (12.0)

絶対値が r、偏角が theta である Complex クラスのオブジェクトを生成します。

...

@param theta 生成する複素数の偏角。単位はラジアンです。省略した場合は 0 です。

//emlist[例][ruby]{
Complex.polar(2.0) # => (2.0+0.0i)
Complex.polar(2.0, 0) # => (2.0+0.0i)
Complex.polar(2.0, Math::PI) # => (-2.0+2.4492127076447545e-16i)
//}...

Float#round(ndigits = 0) -> Integer | Float (12.0)

自身ともっとも近い整数もしくは実数を返します。

...ェクトが整数に変換できない場
合発生します。

//emlist[例][ruby]{
1.0.round # => 1
1.2.round # => 1
(-1.2).round # => -1
(-1.5).round # => -2

t = Math::PI # => 3.141592653589793
t.round(3) # => 3.142
t.round(0) # => 3
t.round(1) # => 3.1

t...

Float#round(ndigits = 0, half: :up) -> Integer | Float (12.0)

自身ともっとも近い整数もしくは実数を返します。

...ェクトが整数に変換できない場
合発生します。

//emlist[例][ruby]{
1.0.round # => 1
1.2.round # => 1
(-1.2).round # => -1
(-1.5).round # => -2

t = Math::PI # => 3.141592653589793
t.round(3) # => 3.142
t.round(0) # => 3
t.round(1) # => 3.1

t...

Vector#angle_with(v) -> Float (12.0)

v と self がなす角度を返します。

...v と self がなす角度を返します。

//emlist[例][ruby]{
require 'matrix'
Vector[1, 0].angle_with(Vector[0, 1]) # => Math::PI/2
//}

@param v このベクトルと self とがなす角度を計算します
@raise ZeroVectorError self もしくは v のどちらかが零ベクトルであ...

main.include(*modules) -> self (12.0)

引数 modules で指定したモジュールを後ろから順番に Object にインクルードします。

...odules Module のインスタンス( Enumerable など)を指定します。

@raise ArgumentError 継承関係が循環してしまうような include を行った場
合に発生します。

//emlist[例:][ruby]{
include Math

hypot(3, 4) # => 5.0
//}

@see Module#include...

絞り込み条件を変える

<< < ... 8 9 10 >>