User Tools

Site Tools


operation

Description

Defines properties of a single operation in a formula operation stack.

Parent Objects

Properties

Name Description Default Required
op Operator. See Details. None yes
val Specify a floating-point scalar operand. None no
url Specifies the URI of a property to evaluate and push onto the stack. None no

Details

The following operator/operand pairings are supported:

Operator Operand Effect
push url Evaluates the given property and pushes the resulting value onto the stack.
push val Pushes the given value onto the stack.
add None Adds the top two stack entries. Pops the top two entries off of the stack, adds them and push the result back on the stack.
sub None Subtracts the top stack entry from the next-to-top entry. Pops two entries off of the stack and pushes the result of the subtraction.
mult None Adds the top two stack entries. Pops the top two entries off of the stack, adds them and push the result back on the stack.
div None Divides the next-to-top stack entry by the top entry. Pops two entries off of the stack and pushes the result of the division.

Examples

  • Push a property value onto the stack:
    {
        "op" : "push",
        "url" : "hips:#hips?rotation/x"
    }
  • Multiply the top two stack entries:
    {
        "op" : "mult"
    }
  • Push the value 1.8 onto the stack:
    {
        "op" : "push",
        "val" : 1.8
    }