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:
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: