mathematics derived from interpolate Example Source Header

Description: a value node that performs common mathematic operations

notes:
Category: Math
Author: Alex Hill
11/01/02
Revision: 04/01/06 Alex Hill - now reads child node and converts to given function

    Messages
abs float, [integer] set a single array element to the absolute value of the input
sin float, [integer] set a single array element to the sine of the input
cos float, [integer] set a single array element to the cosine of the input
rand [integer] set a single array element to a random number
sqrt float, [integer] set a single array element to the square root of the positive input
function [none | abs | sin | cos | sqrt]
    Comments

constructor mathematics

method message

1 set a single array element to the absolute value of the input
2 set a single array element to the sine of the input
3 set a single array element to the cosine of the input
4 set a single array element to a random number
5 set a single array element to the square root of the positive input

method app

1 if this node has size greater than zero and has children
1.1 if child size is greater than one
1.1.1 for each value in the last child node do
1.1.1.1 if the element is less than the size of this node then
1.1.1.1.1 set the element value to the interpolated value of the child value
1.1.1 retrieve the value of the child node
1.1.2 for each element in the array do
1.1.2.1 set the element value to the interpolated value of the value