Skip to content
instance method

Float#-@

() -> ::Float
-self → float

Returns self, negated:

Example
-3.14    # => -3.14
-(-3.14) # => 3.14
-0.0     # => -0.0
See also #- #/ #+ #< also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0