mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Add the polar form in String#to_c
This commit is contained in:
parent
e4191ac1ec
commit
7cf37a5722
1 changed files with 6 additions and 0 deletions
|
@ -2026,6 +2026,12 @@ string_to_c_strict(VALUE self, int raise)
|
|||
* '1/2+3/4i'.to_c #=> ((1/2)+(3/4)*i)
|
||||
* 'ruby'.to_c #=> (0+0i)
|
||||
*
|
||||
* Polar form:
|
||||
* include Math
|
||||
* "1.0@0".to_c #=> (1+0.0i)
|
||||
* "1.0@#{PI/2}".to_c #=> (0.0+1i)
|
||||
* "1.0@#{PI}".to_c #=> (-1+0.0i)
|
||||
*
|
||||
* See Kernel.Complex.
|
||||
*/
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue