update docs
This commit is contained in:
parent
10236c7441
commit
c4f43a0f9d
9 changed files with 39 additions and 13 deletions
|
@ -18,6 +18,13 @@
|
|||
<a href="#18" id="18">18</a>
|
||||
<a href="#19" id="19">19</a>
|
||||
<a href="#20" id="20">20</a>
|
||||
<a href="#21" id="21">21</a>
|
||||
<a href="#22" id="22">22</a>
|
||||
<a href="#23" id="23">23</a>
|
||||
<a href="#24" id="24">24</a>
|
||||
<a href="#25" id="25">25</a>
|
||||
<a href="#26" id="26">26</a>
|
||||
<a href="#27" id="27">27</a>
|
||||
</pre></div><pre class="rust"><code><span class="attr">#![cfg(target_arch = <span class="string">"avr"</span>)]
|
||||
#![no_std]
|
||||
#![feature(c_size_t)]
|
||||
|
@ -28,6 +35,13 @@
|
|||
//! ```
|
||||
//! use arduboy_rust::prelude::*;
|
||||
//! ```
|
||||
//! Inside the Wrapper-Project folder is a folder named src.
|
||||
//! You can disable C++ libraries in the main.h file.
|
||||
//! Just comment the unused library definition out.
|
||||
//!
|
||||
//! To get an idea, the ArduboyTones Library needs 2-3% of the flash memory.
|
||||
//!
|
||||
//! [Here is the link to the GitHub Repo](https://github.com/zenndev1337/rust-for-arduboy)
|
||||
|
||||
</span><span class="kw">extern crate </span>panic_halt;
|
||||
<span class="kw">pub mod </span>hardware;
|
||||
|
|
|
@ -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">&</span><span class="self">self</span>, point: Point, rect: Rect) -> bool {
|
||||
point.x >= rect.x
|
||||
&& point.x < 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">&</span><span class="self">self</span>, rect1: Rect, rect2: Rect) -> bool {
|
||||
!(rect2.x >= rect1.x + rect1.width <span class="kw">as </span>i16
|
||||
|| rect2.x + rect2.width <span class="kw">as </span>i16 <= rect1.x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue