It’s time for Task #7
It’s a basic one, aka hard for beginners to grasp, trivial for more advanced users, and well suited to the middle ground playing to see what they can do with it.
If you find this easy: golf it, make it as short as possible.
If you find this hard, some pointers would be:
You should have a center point of 0,0… You’ll want to adjust your math for this.
A squared + B squared equals C squared is a big hint.
Polar coordinates make this trivial. Learning how they work will help you in many ways.
Good luck!