Ruby | Complex -@ function
Complex#-@() is a Complex class method which returns negation of complex values. Syntax: Complex.-@() Parameter: Complex values Return: negation of complex values. Example #1 : # Ruby code for Complex.-@() method # declaring Complex value a = Complex(200) # declaring Complex value b = Complex(-1, 4)