mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c36ad781ef
commit
b85ed255fa
1 changed files with 8 additions and 0 deletions
|
@ -576,6 +576,11 @@ f_complex_polar(VALUE klass, VALUE x, VALUE y)
|
||||||
* Complex.polar(abs[, arg]) -> complex
|
* Complex.polar(abs[, arg]) -> complex
|
||||||
*
|
*
|
||||||
* Returns a complex object which denotes the given polar form.
|
* Returns a complex object which denotes the given polar form.
|
||||||
|
*
|
||||||
|
* Complex.polar(3, 0) #=> (3.0+0.0i)
|
||||||
|
* Complex.polar(3, Math::PI/2) #=> (1.836909530733566e-16+3.0i)
|
||||||
|
* Complex.polar(3, Math::PI) #=> (-3.0+3.673819061467132e-16i)
|
||||||
|
* Complex.polar(3, -Math::PI/2) #=> (1.836909530733566e-16-3.0i)
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
nucomp_s_polar(int argc, VALUE *argv, VALUE klass)
|
nucomp_s_polar(int argc, VALUE *argv, VALUE klass)
|
||||||
|
@ -985,6 +990,9 @@ nucomp_abs2(VALUE self)
|
||||||
* cmp.phase -> float
|
* cmp.phase -> float
|
||||||
*
|
*
|
||||||
* Returns the angle part of its polar form.
|
* Returns the angle part of its polar form.
|
||||||
|
*
|
||||||
|
* Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
nucomp_arg(VALUE self)
|
nucomp_arg(VALUE self)
|
||||||
|
|
Loading…
Reference in a new issue