slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.96k stars 568 forks source link

Have Math.atan2 #5998

Closed NigelBreslaw closed 2 weeks ago

NigelBreslaw commented 3 weeks ago

As the world of 2D graphics and slint often has minus values for x, y positions you have to be a bit more knowledge to deal with the output from Math.atan. Having atan2 where you can just put in both the x and y values to get an answer would be great.

ogoffart commented 3 weeks ago

Marked as a good first issue, because one can basically grep add a BuiltinFunction::ATan2. One can grep for BuiltinFunction::ATan to see all the place that needs changing.

ogoffart commented 2 weeks ago

Fixed in https://github.com/slint-ui/slint/pull/6004