update docs

This commit is contained in:
ZennDev1337 2023-08-15 15:30:11 +02:00
parent 10236c7441
commit c4f43a0f9d
9 changed files with 39 additions and 13 deletions

View file

@ -1198,7 +1198,7 @@
///Returns
/// true if the specified point is within the specified rectangle.
///
///This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with the given point.
///This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with the given point.
</span><span class="kw">pub fn </span>collide_point(<span class="kw-2">&amp;</span><span class="self">self</span>, point: Point, rect: Rect) -&gt; bool {
point.x &gt;= rect.x
&amp;&amp; point.x &lt; rect.x + rect.width <span class="kw">as </span>i16
@ -1213,7 +1213,7 @@
///Returns
/// true if the first rectangle is intersecting the second.
///
///This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with another rectangular object.
///This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with another rectangular object.
</span><span class="kw">pub fn </span>collide_rect(<span class="kw-2">&amp;</span><span class="self">self</span>, rect1: Rect, rect2: Rect) -&gt; bool {
!(rect2.x &gt;= rect1.x + rect1.width <span class="kw">as </span>i16
|| rect2.x + rect2.width <span class="kw">as </span>i16 &lt;= rect1.x