/**
 * set the start and end direction based on
 * $direction variable
 */
setDirection(state)
    if $direction == 'ltr'
        return state == 'start' ? left : right
    return state == 'start' ? right : left


multiple(value, times)
    if $cssVar == true
        return 'calc(%s * %s)' % (value times)
    return value * times
