Mercurial > games > semicongine
comparison 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 |
comparison
equal
deleted
inserted
replaced
1253:c4f98eb4bb05 | 1254:b0f4c8ccd49a |
---|---|
38 func ConstOne3[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(1), T(1)]) | 38 func ConstOne3[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(1), T(1)]) |
39 func ConstOne4[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(1), T(1), T(1), T(1)]) | 39 func ConstOne4[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(1), T(1), T(1), T(1)]) |
40 func ConstX[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(0), T(0)]) | 40 func ConstX[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(0), T(0)]) |
41 func ConstY[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(1), T(0)]) | 41 func ConstY[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(1), T(0)]) |
42 func ConstZ[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(0), T(1)]) | 42 func ConstZ[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(0), T(1)]) |
43 func ConstR[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(1), T(0), T(0)]) | 43 func ConstR[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(1), T(0), T(0), T(1)]) |
44 func ConstG[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(1), T(0)]) | 44 func ConstG[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(0), T(1), T(0), T(1)]) |
45 func ConstB[T: SomeNumber](): auto {.compiletime.} = TVec3[T]([T(0), T(0), T(1)]) | 45 func ConstB[T: SomeNumber](): auto {.compiletime.} = TVec4[T]([T(0), T(0), T(1), T(1)]) |
46 | 46 |
47 func NewVec2f*(x = 0'f32, y = 0'f32): auto = | 47 func NewVec2f*(x = 0'f32, y = 0'f32): auto = |
48 Vec2f([x, y]) | 48 Vec2f([x, y]) |
49 func NewVec3f*(x = 0'f32, y = 0'f32, z = 0'f32): auto = | 49 func NewVec3f*(x = 0'f32, y = 0'f32, z = 0'f32): auto = |
50 Vec3f([x, y, z]) | 50 Vec3f([x, y, z]) |
85 generateAllVectorConsts() | 85 generateAllVectorConsts() |
86 | 86 |
87 const X* = ConstX[float32]() | 87 const X* = ConstX[float32]() |
88 const Y* = ConstY[float32]() | 88 const Y* = ConstY[float32]() |
89 const Z* = ConstZ[float32]() | 89 const Z* = ConstZ[float32]() |
90 const R* = ConstR[float32]() | |
91 const G* = ConstG[float32]() | |
92 const B* = ConstB[float32]() | |
90 const One1* = ConstOne1[float32]() | 93 const One1* = ConstOne1[float32]() |
91 const One2* = ConstOne2[float32]() | 94 const One2* = ConstOne2[float32]() |
92 const One3* = ConstOne3[float32]() | 95 const One3* = ConstOne3[float32]() |
93 const One4* = ConstOne4[float32]() | 96 const One4* = ConstOne4[float32]() |
94 | 97 |