Closed Mustafif closed 2 months ago
Currently C side is complete, the Zig side will be next to tackle
Initial work completed in https://github.com/Mustafif/MufiZ/commit/f78b6c9da58405923a8793e1d65497c31dabec8a C side completed in https://github.com/Mustafif/MufiZ/commit/f5e8e3ed68e1e3fbce0fc8da3b7d1a3e0c45ccd5 Zig side completed in https://github.com/Mustafif/MufiZ/commit/2f64aab5d730991dab42ed43bba09ff6af1a1c6e
Consider the following example:
Currently, v1 can compile, but v2 can't since the first and second arguments need to be strictly
double
. However, we should enable the user to choose either version and for them to be the "same."The notion of softening the numeric type means that if we expect a
double
but receive anint
, then we accept any number type (double
,int
) and cast it to the correct expected type. This means we need a new macroIS_NUMBER
to check if its either a double or integer, and another macro or function to cast it to the correct expected type. This change should resolve many accidental compile errors for the users, and simplify builtin requirements as we can just simply say any number (real).