Skip to content

Math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD)#403

Open
jopadan wants to merge 3 commits into
fte-team:masterfrom
jopadan:master
Open

Math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD)#403
jopadan wants to merge 3 commits into
fte-team:masterfrom
jopadan:master

Conversation

@jopadan
Copy link
Copy Markdown

@jopadan jopadan commented Nov 27, 2025

Changes

  • add FTE_IS_SCALAR(T) to check if type is a vector or not
  • add FTE_BIT_CEIL(N) to round up to power 2
  • align modes FTE_ALIGN_[UNK|NUM|VEC|MAT|STD]
  • add avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD)
  • quake type defines for new vector type

FTE_ALIGN_STD default aligns if vector size N is a power of 2

Fixes

  • rename WIDTH_CHAR to QWIDTH_CHAR because of limits.h conflicts
  • rename qtv qboolean values to qfalse/qtrue

@jopadan jopadan changed the title Introduce math vector type vec(T,N,A) Introduce math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD) Nov 27, 2025
@jopadan jopadan changed the title Introduce math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD) Introduce math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD) Nov 27, 2025
@jopadan jopadan changed the title Introduce math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD) Math vector type avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD) Nov 27, 2025
**Changes**
- add FTE_IS_SCALAR(T) to check if type is a vector or not
- add FTE_BIT_CEIL(N) to round up to power 2
- align modes FTE_ALIGN_[UNK|NUM|VEC|MAT|STD]
- add avec(T,N,A) and vec(T,N) as avec(T,N,FTE_ALIGN_STD)
- quake type defines for new vector type

FTE_ALIGN_STD default aligns if vector size N is a power of 2

**Fixes**
- rename WIDTH_CHAR to QWIDTH_CHAR because of limits.h conflicts
- rename qtv qboolean values to qfalse/qtrue
@eukara
Copy link
Copy Markdown
Contributor

eukara commented Jan 5, 2026

Gonna tag @Shpoike in case he has any objections

@Xylemon Xylemon added enhancement New feature or request FTEQCC For issues regarding the language, compiler, or its IDE labels Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request FTEQCC For issues regarding the language, compiler, or its IDE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants