Vectors

Five general functions to assist in the creation and manipulation of vectors are built into FISH. These are listed in three sections of the FISH Reference: comp.x, comp.y and comp.z are in the Component Utilities section; math.dot and math.cross are in the Math Utilities section; and vector is in the Constructors section.

The mathematical operators  /, *, +, -   are allowed between two vectors of the same type. Each of these operates on a component-b*y*-component basis. For example, v1 * v2 returns a vector (v1.x * v2.x, v1.y * v2.y, v1.z * v2.z). The * operator is available between a vector and a number (integer or floating-point). The / operator is also available between a vector and a number, but the number must be on the right side.