Skip to content

Conversation

@ibraheem-emad
Copy link

@ibraheem-emad ibraheem-emad commented Feb 5, 2024

the constrain(shape , point) checks if the (point) is inside the (shape) if the point is inside the shape the function returns the (point) coordinate without changes , if the (point) is outside the (shape) the function returns the coordinate of the point inside the (shape) that is the nearest to the (point) we want to constrain
issue #3
also added distance() function to struct v_2d that calculate the distance between two vectors

added distance() to struct v_2d that calcualte the distance between two points
@OneLoneCoder
Copy link
Owner

Thanks! Yeah i like this approach, makes good use of existing functions. Also like the distance() function for v_2d, its a useful addition. Would be worth adding constrain() for line too

@OneLoneCoder OneLoneCoder added good first issue Good for newcomers keep going Almost perfect labels Feb 5, 2024
@ibraheem-emad
Copy link
Author

ibraheem-emad commented Feb 6, 2024

Would be worth adding constrain() for line too.

constrain for line has been added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers keep going Almost perfect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants