- Update deps
- Add
AnglePosition::Top, Bottom, Left, Right
forTriangle::right_angle()
- Change
Triangle::right_angle()
to only take one size
- Fix serde feature
- Make serde feature enabled by default
- Actually Fix prelude/imports
- Fix prelude/imports
- Add
coord!
to prelude - Make
scale_points()
androtate_points()
public
- Add inv_lerp and inv_flerp
- Adds
Hash
to all shapes except Ellipse
- Add
Ellipse
and all relevant methods - Fix bugs in
move_center_to
- Remove debug logging
- Serious breaking changes
- The
Shape
trait no longer has generics so now&dyn Shape
can be used - Removed
Ellipse
as it's completely broken (hopefully temporarily)
- The
- Adds
ShapeBox
an enum that can hold any shape and implements the shape traitscoord!
macro, it acceptsnumber, number
or(number, number)
- All shapes:
to_shape_box()
top_left()
,top_right()
,bottom_left()
,bottom_right()
intersects_rect()
,intersects_line()
,intersects_circle()
,intersects_triangle()
,intersects_polygon()
contains_rect()
,contains_line()
,contains_circle()
,contains_triangle()
,contains_polygon()
Rect
:as_lines()
Circle
as_outer_rect()
replacingas_rect()
, which will be removed in 0.3.0as_inner_rect()
Line
nearest_point()
- Fixes:
Line
:Vertical
/Horizontal
type mix upleft()
,right()
,top()
,bottom()
assuming point order
- Make
Line
andTriangle
serializable
- Add
coord_vec
macro that creates aVec<Coord>
from any number of expressions that can converted to Coords usingCoord::from
- Rename
outline_points
andfilled_points
tooutline_pixels
andfilled_pixels
- Remove duplicate pixels from
*_pixels
methods
- Fix typo in rect points
- Add
outline_points
andfilled_points
for shapes
- Fix bug with multiplying coords and floats
- Add
Shape::move_center_to
- Change angle math to use 0 as top
- Add coord to prelude
- Change constructors to take slices instead of vecs
- Fix bug in
move_to
- Add prelude module
- Add must_use to all methods
- Fix bug with Triangle::right_angle()
- Add Triangle::right_angle and Triangle::equilateral constructor methods
- Make several methods const
- Add Ellipse
- Add Rect::as_polygon()
- Change Polygon::as_triangles() to return None for concave polygons
- Add Rect::as_triangles()
- Initial release