class ComplexNumbers::Complex

Defined in:

complex.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(re : Float64, im : Float64) #

[View source]

Instance Method Detail

def *(other : Complex) #

Multiplication


[View source]
def +(other : Complex) #

Addition


[View source]
def -(other : Complex) #

Subtraction


[View source]
def /(other : Complex) #

Division


[View source]
def abs #

Absolute value (magnitude)


[View source]
def im : Float64 #

[View source]
def im=(im : Float64) #

[View source]
def re : Float64 #

[View source]
def re=(re : Float64) #

[View source]
def to_s #

String representation for easier debugging


[View source]