lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


... premature send syndrome ... I meant to say:

With an explict compose operator, the syntax could be a lot cleaner:

  xform = addPoint(centre) # rotateBy(math.pi / 4) 
          # scaleBy(2) # subtractPoint(centre)

Or using | for reverse-compose, perhaps more familiar:

  xform = subtractPoint(centre) | scaleBy(2) 
          | rotateBy(math.pi / 4) | addPoint(centre)

Unfortunately, this operator does not exist in Lua :(

R.