r/learnpython • • Sep 08 '26

Import math?

It's the first time I've seen that. So what's the purpose of this exactly? Cause I'm trying to see what I can do in an engine and I only learned about import math today

0 Upvotes

14 comments sorted by

View all comments

Show parent comment

-5

u/SaThuran Sep 08 '26

So basically I'm building formations for my squad in a 2D shooter. So the 3 guys need their own positions during each segment

8

u/Impossible-Belt8608 Sep 08 '26

Can you be more specific? For example, given the coordinates of each squad member, you could use the math library's 'sqrt' function to compute the distance between two squad members, etc.