Meta Vens
5d8ef0c3de
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
...
tools/generate-swizzles.ps1 writes the checked-in src/CultMath/Swizzles.g.cs
as partial structs plus a partial math: for float2/3/4, int2/3/4 and bool2/3/4
every swizzle of length 2-4 including repeats, in xyzw and rgba naming, with
setters only on non-repeating masks, plus single-component r/g/b/a. double2/3
get lengths 2-3 (there is no double4). Every HLSL mixed constructor
(float4(float2, float2), float4(float, float2, float), copy forms, ...) exists
as a struct constructor and, for float/int/bool, a math function. The
hand-written swizzles and mixed constructors it supersedes are deleted.
Matrices store private rows and return ref float2/float3 from the row
indexer ([UnscopedRef], polyfilled for netstandard2.1), so m[1][2] = s
compiles as in HLSL; _mRC are get/set properties over the rows. Equality and
hashing stay value-based.
Intrinsics follow HLSL: sign returns int/intN and yields 0 for NaN; step is
x >= y ? 1 : 0 so NaN yields 0; any/all accept float and int vectors;
min/max/abs on int vectors return int vectors, and abs(int) returns int.
Strips the UTF-8 BOMs this branch added to math.cs, CultMath.csproj and
HlslSemanticsTests.cs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 13:57:02 +02:00
..
BatchMath.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
BatchMath.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
bool2.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
bool2.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
bool3.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
bool3.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
bool4.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
bool4.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
Color32.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
Color32.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
CultMath.asmdef
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
CultMath.asmdef.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
CultMath.csproj
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
CultMath.csproj.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
CultMathTone.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
CultMathTone.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
double2.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
double2.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
double3.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
double3.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
float2.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
float2.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
float2x2.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
float2x2.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
float3.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
float3.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
float3x3.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
float3x3.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
float4.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
float4.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
int2.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
int2.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
int3.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
int3.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
int4.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
int4.cs.meta
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
IsExternalInit.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
IsExternalInit.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
math.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
math.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
quaternion.cs
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
quaternion.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
Random.cs
Make CultMath HLSL-shaped: writable components, bool-vector comparisons
2026-09-14 13:29:59 +02:00
Random.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
rect.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
rect.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
Swizzles.g.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
Swizzles.g.cs.meta
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
UnscopedRefAttribute.cs
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
UnscopedRefAttribute.cs.meta
Generate every HLSL swizzle and mixed constructor; fix intrinsic types
2026-09-14 13:57:02 +02:00
Voronoi.cs
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00
Voronoi.cs.meta
Move CultMath into the CultLib monorepo
2026-08-26 17:35:51 +02:00