ottypes / json0

Version 0 of the JSON OT type
449 stars 64 forks source link

Numeric Operations #6

Closed jimktrains closed 9 years ago

jimktrains commented 9 years ago

In the readme it states:

    Are there any other ways the format should support modifying numbers? Ideas:

        Linear multiple as well (Ie, x = Bx + C)
        MAX, MIN, etc? That would let you do timestamps...

    I can't think of any good use cases for those operations...

One use-case for linear multiples if if you're storing a matrix and want to perform a multiplications, you could do the linear multiple for each element in the matrix, an example might be a transformation matrix used in graphics: one person could be scaling and one person could be rotating. Though the entire multiplication may be split across multiple commands.

jimktrains commented 9 years ago

Affine transformations can't be done commutatively. Also, linear multiples may be difficult to in a commutative manner. MAX and MIN should be doable, but I'll close this and make a new one if I have a PR for them.