====== MPINO STUDIO 2 Phase 4-4 · Arithmetic Box Functions ====== These commands store arithmetic, increment, scaling, and floating-point results. {{ :en-us_products:mpino_studio2:arithmetic-flow.svg?1000 |These commands store arithmetic, increment, scaling, and floating-point results. }} ===== Common Rules ===== The first two values are sources and the final address stores the result. ''INC'' and ''DEC'' change the target itself by one. The data format and range follow the memory rules in Phase 2. ===== Box Function List ===== ^ Command ^ Meaning ^ | [[en-us_products:mpino_studio2:box_functions:arithmetic:add|ADD]] | Adds two values and stores the result in the destination. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:sub|SUB]] | Subtracts the second value from the first and stores the result in the destination. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:mul|MUL]] | Multiplies two values and stores the result in the destination. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:div|DIV]] | Divides the first value by the second and stores the quotient. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:mod|MOD]] | Divides the first value by the second and stores the remainder. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:inc|INC]] | Increments the destination by one and stores it back at the same address. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:dec|DEC]] | Decrements the destination by one and stores it back at the same address. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:scale|SCALE]] | Linearly maps an integer from an input range to an integer output range. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:floor|FLOOR]] | Stores the greatest integer that is not larger than the source. | | [[en-us_products:mpino_studio2:box_functions:arithmetic:sqrt|SQRT]] | Stores the square root of the source. | ===== Related Documentation ===== * [[en-us_products:mpino_studio2:box_functions|Phase 4 · Box Functions]] * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]