Coord2d
A Rust library for working with 2D coordinates and vectors.
Overview
Coord2D provides a robust and flexible way to manage and manipulate 2D
coordinates and vectors in Rust. It supports various mathematical operations,
type conversions, and vector properties like magnitude and midpoint, making it
ideal for 2D geometry computations.
Features
- Coordinate Management: Define and manipulate 2D coordinates with ease.
- Mathematical Operations: Perform addition, subtraction, multiplication, and division on coordinates.
- Type Flexibility: Supports multiple integer and floating-point types, such
as
i32,f32,usize, and more. - Vector Utilities: Calculate magnitude, midpoint, and more.
- Conversions: Convert coordinates to vectors, tuples, or
Vecformats. - Extensible: Designed with modularity to support future enhancements like shapes.
Getting Started
Add coord2d to your Cargo.toml:
[]
= "*"
Examples
Working with Coordinates
use *;
Working with Vectors
use *;
Planned Features
- 2D Shapes: Add support for shape creation and manipulation.
- Code Cleanup: Refactor and clean up the codebase.
Contributing
We welcome contributions to improve coord2d. If you have ideas or spot issues:
- Open an issue on GitHub.
- Submit a pull request with your changes.
License
This project is licensed under the GPL License.
Enjoy using coord2d for your projects? Give us a star! 🌟