I've been thinking that some math functions could be useful, even if they are limited by the short int integer format. I'm happy to write these myself, but thought it'd be worth getting some feedback before implementation. I'm currently thinking of the following:
SQRT(x) for square roots
POW(x,y) for exponents (x^y)
MOD(x,y) for modulus or division remainder (e.g. returns 2 for 8 % 3)
SIN(x), COS(x), TAN(x) for sine/cosine/tangent where x is in degrees and the output is returned as -127 to 127 mapping to -1 to 1
ASIN(x), ACOS(x), ATAN(x) for arcsine/arccos/arctangent taking -127 to 127 and returning 0 to 360.
I've been thinking that some math functions could be useful, even if they are limited by the short int integer format. I'm happy to write these myself, but thought it'd be worth getting some feedback before implementation. I'm currently thinking of the following:
I see https://github.com/BleuLlama/TinyBasicPlus/issues/33 mentions MIN and MAX already, otherwise I would add these to my list.