lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On Apr 7, 2018, at 5:18 PM, Soni They/Them L. <fakedme@gmail.com> wrote:
> 
> Why have __add or __unm at all anyway
> 
> A + B == A - (0 - B)
> -A == (0 - A)

Killing two birds with one stone ?
Nice shot

> Also why have __mul
> 
> A * B == A / (1 / B)
> 

No, you cannot remove __mul like that,
Example:

1 * 49 = 49.0
1 / (1/49) = 1 / 0.02040816326530612 = 49.00000000000001