Mercurial > games > semicongine
diff semiconginev2/core/vector.nim @ 1254:b0f4c8ccd49a
did: stuff to test gltf importer
author | sam <sam@basx.dev> |
---|---|
date | Sat, 27 Jul 2024 20:47:54 +0700 |
parents | c4f98eb4bb05 |
children |
line wrap: on
line diff
--- a/semiconginev2/core/vector.nim Fri Jul 26 23:39:24 2024 +0700 +++ b/semiconginev2/core/vector.nim Sat Jul 27 20:47:54 2024 +0700 @@ -40,9 +40,9 @@ func ConstX[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(0), T(0)]) func ConstY[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(1), T(0)]) func ConstZ[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(0), T(1)]) -func ConstR[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(0), T(0)]) -func ConstG[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(1), T(0)]) -func ConstB[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(0), T(1)]) +func ConstR[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(1), T(0), T(0), T(1)]) +func ConstG[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(0), T(1), T(0), T(1)]) +func ConstB[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(0), T(0), T(1), T(1)]) func NewVec2f*(x = 0'f32, y = 0'f32): auto = Vec2f([x, y]) @@ -87,6 +87,9 @@ const X* = ConstX[float32]() const Y* = ConstY[float32]() const Z* = ConstZ[float32]() +const R* = ConstR[float32]() +const G* = ConstG[float32]() +const B* = ConstB[float32]() const One1* = ConstOne1[float32]() const One2* = ConstOne2[float32]() const One3* = ConstOne3[float32]()