|
| Release 4.0 |
 |
Operators - +
| Operator : | + - Addition |
| Unary / binary: | Binary |
| Prefix / infix: | Infix |
| Input data type |
Output data type |
| real+real |
real |
| real+complex |
complex |
| real+vector |
vector |
| real+quaternion |
quaternion |
| complex+real |
complex |
| complex+complex |
complex |
| complex+quaternion |
quaternion |
| vector+real |
vector |
| vector+vector |
vector |
| quaternion+real |
quaternion |
| quaternion+complex |
quaternion |
| quaternion+quaternion |
quaternion |
| color+color |
color |
Notes:
The addition operator adds the both operands. The resulting data type is the biggest data type of op1 and op2.
If you add two colors c1=(r1,g1,b1,a1) and c2=(r2,g2,b2,a2), then the operation is performed per component, i.e. c3=c1+c2=rgba(r1+r2,g1+g2,b1+b2,a1+a2).
Examples:
3+4 = 7
x+y
|