|
Release 4.0 |
 |
Operators - -
Operator : | - - subtraction |
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:
This operator subtracts the second operand from the first one. The resulting data type is the biggest data type of op1 and op2.
If you subtract a color c2=(r2,g2,b2,a2) from another color c1=(r1,g1,b1,a1), then the operation is performed per component, i.e. c3=c1-c2=rgba(r1-r2,g1-g2,b1-b2,a1-a2).
Examples:
3-4 = -1
x-y
|