You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A method to check if a point self is somewhere inside the area of a rectangle with point a being the top-left corner and point b being the bottom-right corner.
pubfnwithin(&self,a:&Vec2,b:&Vec2) -> bool
example:
let a = Vec2::ZERO;let b = Vec2::ONE;assert!(Vec2::(0.5,0.5).within(&a,&b))assert!(Vec2::ONE.within(&a,&b))assert!(Vec2::(1.5,0.25).within(&a,&b))// Assertion fails because `1.5 > 1.0`
The text was updated successfully, but these errors were encountered:
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.
Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.
A method to check if a point
self
is somewhere inside the area of a rectangle with pointa
being the top-left corner and pointb
being the bottom-right corner.example:
The text was updated successfully, but these errors were encountered: