method

magnitude

v2_4_6 - Show latest stable - Class: Complex
magnitude()
public

Returns the absolute part of its polar form.

Complex(-1).abs         #=> 1
Complex(3.0, -4.0).abs  #=> 5.0