negate -package:synthesizer-dimensional

Unary negation.
Negate a vector.
inverse with respect to +
2's complement bitvector negation.
forVector number_ $ \xs -> xs == Vector.negate (Vector.negate xs)
Negate an integer or real number.
Negates the value of a Quantity.
Negates the value of a possibly scaled SQuantity, preserving any scale factor.
forSliced number_ $ \xs -> VectorSlice.toVector xs == Vector.negate (VectorSlice.negate xs)
Negates an interval. Returns Nothing if the result would overflow.
>>> negate (MkInterval 1 2 3)
Just (MkInterval {months = -1, days = -2, microseconds = -3})

>>> negate (MkInterval (-2147483648) 0 0)
Nothing