disaster-math v1.0.11
Disaster Math
This package posits that a rift in spacetime has ruined arithmetic. 2 + 2 still equals 4, but let's not even get in to anything more complicated than that.
The rules are stupid, so don't bother to understand them!
Use the functions exported from this package -- add, subtract, multiply, and divide -- to derive the "correct" answers in this ridiculous universe.
Exports
The default export from the package is an object containing add, subtract, multiply, and divide keys with the corresponding function.
Each function is also individually exported.
Usage
add
Syntax: add(n1, n2)
Returns: The alternate-universe "sum" of n1 and n2.
subtract
Syntax: subtract(n1, n2)
Returns: The alternate-universe "difference" of n1 and n2.
multiply
Syntax: multiply(n1, n2)
Returns: The alternate-universe "product" of n1 and n2.
divide
Syntax: divide(n1, n2)
Returns: The alternate-universe "quotient" of n1 and n2.
I, for one, welcome the new nonsense math!
