Previous:Vector Expressions Main Index Next:Vector Identifiers

#### Vector Literals

Vectors literals consist of two to five float expressions that are bracketed by angle brackets `<` and `>`. The terms are separated by commas. For example here is a typical three component vector:

     < 1.0, 3.2, -5.4578 >

The commas between components are necessary to keep the program from thinking that the 2nd term is the single float expression `3.2-5.4578` and that there is no 3rd term. If you see an error message such as "Float expected but '>' found instead" then you probably have missed a comma.

Sometimes POV-Ray requires you to specify floats and vectors side-by-side. The rules for vector expressions allow for mixing of vectors with vectors or vectors with floats so commas are required separators whenever an ambiguity might arise. For example `<1,2,3>-4` evaluates as a mixed float and vector expression where 4 is subtracted from each component resulting in `<-3,-2,-1>`. However the comma in `<1,2,3>,-4` means this is a vector followed by a float.

Each component may be a full float expression. For example `<This+3,That/3,5*Other_Thing>` is a valid vector.

Previous:Vector Expressions Main Index Next:Vector Identifiers