@@ -43,6 +43,19 @@ There is swizzling support:
4343 color.rgb = color.bgr
4444
4545
46+ matrices can be printed with echo, because they have tho ` $ ` operator
47+ implemented. My default they use nice unicode characters for best
48+ visual representation. But if you have probmles with them, you can
49+ pass `` -d:noUnicode `` to the compiler and the `` $ `` functions will use
50+ a pure ASCII representation.
51+
52+ ASCII unicode
53+
54+ / 3 7 3 0 \ ⎡3 7 3 0⎤
55+ | 0 2 -1 1 | ⎢0 2 -1 1⎥
56+ | 5 4 3 2 | ⎢5 4 3 2⎥
57+ \ 6 6 4 -1 / ⎣6 6 4 -1⎦
58+
4659perlin noise:
4760
4861 import glm/vec
@@ -83,13 +96,15 @@ perlin noise:
8396
8497* Changes regarding based to C++glm and glsl
8598
86- - the ` mod ` function is called ` modulo ` instead. ` mod ` is already an
87- operator in Nim and has it's own meaning that is very different to
88- the meaning of the ` mod ` function in glsl. The name ` fmod ` is also
89- not good, because ` fmod ` in c++ has also a different meaning.
90- Therefore ` mod ` is simply named ` modulo ` in nim-glm. The other
91- mod functions all have a behavior towards zero, modulo does not
92- have this.
99+ - the ` mod ` function is called ` floorMod ` instead. ` mod ` is already
100+ an operator in Nim and has it's own meaning that is very different
101+ to the meaning of the ` mod ` function in glsl. The name ` fmod ` is
102+ also not good, because ` fmod ` in c++ has also a different meaning.
103+ The function ` floorMod ` from the `` math `` package has the same
104+ meaning as the ` mod ` function in glsl. Therefore ` mod ` is simply
105+ named ` floorMod ` to be at least consistent with the Nim standard
106+ library. The ` mod ` operator always rounds towards zero, I
107+ recommend to never use this operator.
93108
94109 - swizzle support. Unlike c++, Nim allows pretty well to implement
95110 swizzling. So it is implemented with least amount of surprise.
0 commit comments