1
0

refactor: refactor VectorGen

- use uv to manage VectorGen
- use std::partial_ordering to replace auto in template because auto is not works for seperated implementation and declaration.
- rename YYCC macro due to the upgrade of YYCC.
This commit is contained in:
2026-01-25 10:36:42 +08:00
parent 5477072d70
commit 09ca976fd9
10 changed files with 206 additions and 68 deletions

View File

@@ -1,3 +1,13 @@
# Vector Generator
Vector types (LibCmo::VxMath::VxVector3 and etc) and Vector-like types (LibCmo::VxMath::VxColor and etc) nearly have similar declaration except slight differences (basically is the count of factors). Manually writing these declarations is boring and easy to cause potential invisible bugs. So we use a Python script to generate these declarations batchly to prevent any defects indroduced above.
## Overview
Vector types (LibCmo::VxMath::VxVector3 and etc) and Vector-like types (LibCmo::VxMath::VxColor and etc) nearly have similar declaration except slight differences (basically is the count of factors).
Manually writing these declarations is boring and easy to cause potential invisible bugs.
So we use a Python script to generate these declarations batchly to prevent any defects indroduced above.
## Usage
* Setup this project with Astral UV.
* Execute `uv run main.py`
* Generated files are `VxTypes.hpp` and `VxTypes.cpp` and locate in this directory.