collider.cr
Collider
Code status
Installation
Add this to your application's shard.yml
:
dependencies:
collider:
github: forsaken1/collider.cr
Usage
require "collider"
...
# check rectangles collisions (for two rectangles)
# three parameters:
# angle of reference system from base reference system of first rectangle (radians, Float64),
# angle of reference system from base reference system of second rectangle (radians, Float64),
# rectangle coordinates in format: [x1, y1, x2, y2, ..., x8, y8] : Array(Float64)
Collider.separating_axis_theorem_for_rectangles 0.to_rad, 50.to_rad,
Collider.rectangle_points(fx, fy, fw) +
Collider.rectangle_points_rotate(50.to_rad, Collider.rectangle_points(ox, oy, ow))
Contributing
- Fork it ( https://github.com/forsaken1/collider.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- forsaken1 forsaken1 - creator, maintainer
Repository
collider.cr
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- almost 7 years ago
- October 22, 2016
License
MIT License
Links
Synced at
Sun, 17 Nov 2024 18:41:57 GMT
Languages