Logo

Programming-Idioms

History of Idiom 77 > diff from v5 to v6

Edit summary for version 6 by :

Version 5

2015-08-31, 11:55:44

Version 6

2015-09-03, 16:08:36

Idiom #77 Complex number

Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.

Idiom #77 Complex number

Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.

Code
x = 3i - 2
x *= 1i
Doc URL
http://ruby-doc.org/core-2.2.3/Complex.html