Metadata-Version: 2.4
Name: calc_seereen
Version: 0.0.2
Summary: A simple calculation tools package
Author-email: seereen <seereenwaehayee@gmail.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# calc_tools_yiing681

ตัวอย่าง Python Package มาตรฐาน PEP 517/621 ที่มี 2 โมดูลการทำงาน

## การใช้งาน

```python
import calc_tools_yiing681 as pkg

# ใช้งานฟังก์ชันจาก functions
print(pkg.linear(2, 3, 1))  # 7

# ใช้งานฟังก์ชันจาก vectors
print(pkg.add_vectors((1, 2), (3, 4)))  # (4, 6)
description = "A simple calculation tools package"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
]
# calc_tools_yiing681

[![PyPI version](https://img.shields.io/pypi/v/calc_seereen.svg)](https://pypi.org/project/calc-seereen/)
[![Python Versions](https://img.shields.io/pypi/pyversions/calc_seereen.svg)](https://pypi.org/project/calc-seereen/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> **calc_tools_yiing681** คือ Python Package มาตรฐาน PEP 517/621 ที่รวบรวมฟังก์ชันสำหรับการคำนวณคณิตศาสตร์พื้นฐานและพีชคณิตเวกเตอร์ (Vector Algebra) สำหรับการเรียนรู้และการใช้งานทั่วไป

---

## 📋 รายการฟังก์ชันทั้งหมดในแพ็กเกจ (Features Overview)

แพ็กเกจนี้ประกอบด้วย **2 โมดูลหลัก** รวมทั้งสิ้น **10 ฟังก์ชัน**:

### 1. โมดูล `functions` (ฟังก์ชันทางคณิตศาสตร์)
| ฟังก์ชัน | การทำงาน | สมการ / คำอธิบาย |
| :--- | :--- | :--- |
| `linear(a, b, x)` | ฟังก์ชันเส้นตรง | $f(x) = ax + b$ |
| `quadratic(a, b, c, x)` | ฟังก์ชันพหุนามกำลังสอง | $f(x) = ax^2 + bx + c$ |
| `cube(x)` | ฟังก์ชันยกกำลังสาม | $f(x) = x^3$ |
| `absolute(x)` | ค่าสัมบูรณ์ | $f(x) = \Vert{}x\Vert{}$ |
| `evaluate(fx, x)` | ประเมินค่าฟังก์ชัน | คืนค่า $fx(x)$ ที่ส่งเข้ามา |

### 2. โมดูล `vectors` (การคำนวณเวกเตอร์)
| ฟังก์ชัน | การทำงาน | คำอธิบาย |
| :--- | :--- | :--- |
| `magnitude(v)` | ขนาดเวกเตอร์ | คำนวณ $\sqrt{\sum v_i^2}$ |
| `add_vectors(v1, v2)` | การบวกเวกเตอร์ | ผลบวกตำแหน่งต่อตำแหน่ง |
| `subtract_vectors(v1, v2)` | การลบเวกเตอร์ | ผลลบตำแหน่งต่อตำแหน่ง |
| `dot_product(v1, v2)` | ผลคูณเชิงสเกลาร์ | Dot Product ($\sum v_{1i} \cdot v_{2i}$) |
| `scalar_multiply(v, k)` | คูณสเกลาร์ | คูณค่า $k$ เข้าทุกองค์ประกอบ |

---

## 💻 การติดตั้ง (Installation)

สามารถติดตั้งแพ็กเกจผ่าน `pip` ได้โดยตรง:

```bash
pip install calc-seereen

import calc_tools_yiing681 as pkg

# 1. ฟังก์ชันเส้นตรง f(x) = 2x + 3 ที่ x = 5
res_linear = pkg.linear(2, 3, 5)
print(f"Linear: {res_linear}")  # Output: 13

# 2. ฟังก์ชันพหุนาม f(x) = x^2 + 2x + 1 ที่ x = 3
res_quad = pkg.quadratic(1, 2, 1, 3)
print(f"Quadratic: {res_quad}")  # Output: 16

# 3. ยกกำลังสาม
print(f"Cube: {pkg.cube(4)}")  # Output: 64

# 4. ค่าสัมบูรณ์
print(f"Absolute: {pkg.absolute(-12.5)}")  # Output: 12.5

# 5. ประเมินค่าฟังก์ชันผ่าน evaluate
print(f"Evaluate: {pkg.evaluate(lambda x: x**2 + 5, 3)}")  # Output: 14

import calc_tools_yiing681 as pkg

v1 = (3, 4)
v2 = (1, 2)

# 1. ขนาดของเวกเตอร์ (Magnitude)
print(f"Magnitude v1: {pkg.magnitude(v1)}")  # Output: 5.0

# 2. การบวกเวกเตอร์ (Vector Addition)
print(f"v1 + v2: {pkg.add_vectors(v1, v2)}")  # Output: (4, 6)

# 3. การลบเวกเตอร์ (Vector Subtraction)
print(f"v1 - v2: {pkg.subtract_vectors(v1, v2)}")  # Output: (2, 2)

# 4. ผลคูณเชิงสเกลาร์ (Dot Product)
print(f"v1 . v2: {pkg.dot_product(v1, v2)}")  # Output: 11

# 5. การคูณด้วยสเกลาร์ (Scalar Multiplication)
print(f"v1 * 3: {pkg.scalar_multiply(v1, 3)}")  # Output: (9, 12)

