Page 1 of 1

[17] atan2 function for noise expressions

Posted: Fri Dec 27, 2019 5:33 am
by Honktown
https://mods.factorio.com/mod/atan2xy

Makes atan2 available to noise expressions, with some edge case restrictions (only promised to work with positions - other variables not so much).

I figured out a way to do conditionals in the noise expression filter, with variable arguments (if-else-chain complains if you give it variables, as does stuff like clamp).

As mentioned, there's some edge case issues, but it'd work for most conditionals (the edge cases are expressions with undefined values, etc, where the math goes bad).

If anyone had any questions on noise expressions I might be able to answer, I would. I was thinking about re-implementing some of the base functions, with support for variable arguments (maybe starting with clamp and ridge if they're possible). I have no goal here, I just find it interesting. If someone HAS goals with the noise expressions, I'd appreciate knowing what they are.