Metadata-Version: 2.4
Name: ezvectors
Version: 0.1.0
Summary: A lightweight, zero-dependency 2D vector library for Python.
Project-URL: Homepage, https://github.com/adyanthm/physics
Author-email: Adyan <adyan@example.com>
License: MIT License
        
        Copyright (c) 2026 Adyan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE.md
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# ezvectors

A lightweight, high-performance, zero-dependency 2D vector library for Python.

`ezvectors` provides a robust `Vector2` class with a simple and intuitive API for standard vector mathematics. It is highly optimized for fast hot loops, making it suitable for game development, physics engines, and geometry calculations.

## Installation

You can install `ezvectors` via pip:

```bash
pip install ezvectors
```

## Quick Start

```python
from ezvectors import Vector2

# Initialization
v1 = Vector2(3, 4)
v2 = Vector2(5, 6)
v3 = Vector2((1, 2)) # From a tuple

# Math operations
print(v1 + v2)         # Vector2(8, 10)
print(v1 - (1, 1))     # Vector2(2, 3)
print(v1 * 2)          # Vector2(6, 8)
print(v2 / 2)          # Vector2(2.5, 3.0)

# Properties & Geometry
print(v1.magnitude())        # 5.0
print(v1.normalize())        # Vector2(0.6, 0.8)
print(v1.distance_to(v2))    # 2.8284271247461903
print(v1.dot(v2))            # 39
print(v1.cross(v2))          # -2

# Iteration and Unpacking
x, y = v1
print(f"X: {x}, Y: {y}")

# Advanced
print(v1.rotate_deg(90))     # Rotates vector by 90 degrees
```

## Features

* **Zero Dependencies:** Written purely in standard Python using `math`.
* **Highly Optimized:** Utilizes Python `__slots__` for low memory footprint and fast execution without redundant object allocations in critical loops.
* **Tuple Compatibility:** Seamlessly integrates with standard Python tuples in mathematical operations (e.g., `Vector2(1, 1) + (2, 2)`).

## License

This project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for details.
