In mathematics, an

Operator Types | Description | Examples |

Unary | Operators that act on one value | ++, --, ~, ! |

Binary | Operators that act on two values. | +, -, *, /, %, +=, -=, *=, /=, %=, &&, ||, !, ==, !=, <=, <, >=, > |

Boolean | Operators that work with TRUE and FALSE values. | &&, ||, !, ==, !=, <=, <, >=, > |

Bitwise | Operators that work with bitfields | &, |, ~, ^, <<, >> |

Assignment | Special operators that assign a value to a variable. | =, +=, -=, *=, /=, %= |

All operators in order of execution or precedence, from high to low:

Operation | Description |

() [] . | Parentheses, Square Brackets and Dot Operator |

! ~ ++ -- | NOT, One's Complement, Increment, Decrement |

* / % | Multiply, Divide, Modulus (% is also Vector Cross) |

+ - | Addition and Subtraction |

<< >> | Left Shift, Right Shift |

< <= > >= | Less Than, Less Than Or Equal To, Greater Than, Greater Than or Equal To |

== != | Comparison Equal, Comparison Not Equal |

& | Bitwise AND |

^ | Bitwise XOR |

| | Bitwise OR |

|| | Comparison OR |

&& | Comparison AND |

= += -= *= /= %= | Assignment |

Math

Operators | Unary | Binary | Bitwise | Boolean | Equality | Assignment

Comments [Hide comments/form]

No offense but it's also pretty pointless. Operator usage is fairly obvious, and the unsupported combinations are so many, that we should probably redo this page in plain text :)

-- EggyLippmann (2004-08-14 18:40:14)

Find an easy method of describing all the combinations and I'll be all for it eggy :)

-- ChristopherOmega (2004-08-15 01:22:57)

Anywho, I added Multiplication...For The Newbs..For The Newbs *wink*

-- MingChen (2004-09-25 21:21:32)

added Devision and corrected Multiplication for vectors & rotations.

-- BlindWanderer (2004-09-25 23:37:48)

Corrected the multiplication table (*), removing an extraneous "Not allowed" column from the vector row. Table cells line up with their proper descriptions now.

-- ChandraPage (2005-02-11 11:04:43)

This is scary there is a "\=" operator and it acts just like "="

... i think

... i think

-- BlindWanderer (2005-09-21 16:39:05)

Attach a comment to this page: