Remix.run Logo
CapsAdmin 8 days ago

game math libraries often have this (and glsl gpu shader language), like "2 * vec3(1,2,3)" results in "vec3(2,4,6)"

There are other cases like adding vectors to matrices and so on, but in the end this logic is defined in some custom add operator overload on a class or object in the language.

(I had no idea what it meant either until i searched for examples..)