Full Library / Math Operator / Math and Trig / Scale
Block Name: Scale
Code File Location: VisualSim/actor/lib/Scale
Block Overview
- Produce an output token on each firing with a value that is equal to a scaled version of the input. The actor is polymorphic in that it can support any token type that supports multiplication by the factor parameter. If the input type is a scalar, the output type is constrained to be at least as general as both the input and the factor parameter; if the input is an array, the output is also an array with the elements scaled. The input can be an array of array, in which case the elements of the inner most array will be scaled. For data types where multiplication is not commutative (such as matrices), whether the factor is multiplied on the left is controlled by the scaleOnLeft parameter. Setting the parameter to true means that the factor is multiplied on the left, and the input on the right. Otherwise, the factor is multiplied on the right.
factor
public Parameter factor
- The factor. This parameter can contain any scalar token that supports multiplication. The default value of this parameter is the IntToken 1.
scaleOnLeft
public Parameter scaleOnLeft
- Multiply on the left. This parameter controls whether the scale factor is multiplied on the left. The default value is a boolean token of value true. Setting is to false will multiply the factor on the right.
Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator