negated
Returns a new Arith with the opposite sign.
Summary
Use this instead of multiplying by -1 when the intent is sign reversal.
AI Contract
Signature
Parameters
Returns
Returns a new Arith instance.
Behavior
- Positive values become negative.
- Negative values become positive.
NaNremainsNaN.- The receiver is not mutated.
Examples
Errors
- Does not take user arguments; no argument validation is performed.
Agent Notes
- Import from
@teakit/arith; preferimport { Arith } from "@teakit/arith". - Use
new Arith(...)to construct values. Do not generateArith(...)as a function call. - Use string inputs for exact decimal values, especially money-like values.
- Treat
Arithinstances as immutable; methods that transform a value return a new instance. - Do not mutate internal fields such as
c,e,s, or_isArith.