Expand description
This crate provides simple Iterator for enumerating rectangle.
§Example
extern crate rect_iter;
extern crate euclid;
use euclid::Vector2D;
use rect_iter::{RectRange, FromTuple2, GetMut2D};
type MyVec = Vector2D<u64, ()>;
fn main() {
let range = RectRange::from_ranges(4..9, 5..10).unwrap();
let mut buffer = vec![vec![0.0; 100]; 100];
range.iter().for_each(|t| {
let len = MyVec::from_tuple2(t).to_f64().length();
*buffer.get_mut_p(t) = len;
});
}
Structs§
- An Iterator type enumerating rectangle area.
- RectRange is rectangle representation using
std::ops::Range
.
Enums§
- Error type for invalid access to 2D array.
Traits§
- To manipulate many Point libraries in the same way, we use tuple as entry points of API.
- A trait which provides common access interfaces to 2D Array type.
- To manipulate many Point libraries in the same way, we use tuple as a entry point of API. If you implement IntoTuple2 to your point type, you can use it as Point in this library.
- A generic trait for converting a value to a number.