Metadata-Version: 2.4
Name: math_multipromt
Version: 0.1.6
Summary: Моя математическая библиотека
Author: Juri Tee
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# math_multipromt

A custom mathematical Python library for high-precision arithmetic, geometric operations, trigonometric calculations, and angular unit conversions.

> **Warning!** 
> This module uses a custom `Float64` class (64-bit structure with a 40-bit exponent and a 23-bit mantissa). It is not fully compatible with standard Python `float` or third-party libraries (e.g., NumPy). Use `Float64(val)` explicitly or convert back using `float(val)` / `int(val)`.

---

## Main Features

### 1. Custom Data Types
* **`Float64`**: Custom 64-bit float representation supporting arithmetic operators, powers, and bitwise parsing.
* **`ComplexFloat64`**: Complex numbers based on `Float64`.
* **`Point`**, **`Vector`**, **`Matrix`**: Basic 2D linear algebra and geometric primitives.

---

### 2. Angular Unit Conversions
The library provides built-in helper functions to convert angles between **Radians**, **Degrees**, and **Rotations (Turns)**:

| Function | Description |
| :--- | :--- |
| `rad_to_rot(radians)` | Converts radians to rotations (turns) |
| `rad_to_deg(radians)` | Converts radians to degrees |
| `rot_to_rad(rotations)` | Converts rotations to radians |
| `rot_to_deg(rotations)` | Converts rotations to degrees |
| `deg_to_rot(degrees)` | Converts degrees to rotations |
| `deg_to_rad(degrees)` | Converts degrees to radians |

---

### 3. Interpolation Functions
* `mix(v1, v2, t)`: Linear interpolation (Lerp).
* `mix_quadratic(v1, v2, t)`: Quadratic interpolation (Ease-In).
* `mix_sinusoidal(v1, v2, t)`: Sinusoidal interpolation (Ease-In-Out).

---

## Quick Usage Example

```python
from math_promt.math_promt import (
    Float64, Point, Vector, sin, pi,
    deg_to_rad, rad_to_deg, mix
)

# Angular conversion
rad = deg_to_rad(180)
print("180 degrees in radians:", rad)

# Trigonometry
print("sin(pi/2):", sin(pi / 2))

# Geometry
p = Point(1, 1)
v = Vector(2, 3)
print("Point + Vector:", p + v)

# Interpolation
print("Linear Mix:", mix(0, 100, 0.5))
