Complex
struct Complex
Overview
A complex number is a number represented in the form a + bi. In this form, a and b are real numbers, and i is an imaginary number such as i² = -1. The a is the real part of the number, and the b is the imaginary part of the number.
require "complex" Complex.new(1, 0) # => 1.0 + 0.0i Complex.new(5, -12) # => 5.0 - 12.0i