Advanced Gamemaker, Game Design, Gamemaker AI, Gamemaker Basics, Hotline Miami Remake, Interviews, Made in Gamemaker, Pixel Art Game, Super Demon Survivors, Uncategorized, Vampire Survivors Remake, Video Game Reviews, Visual Effects
What are unary operators? [1 day before exam]
These operators are called unary because they are a shorthand way how to write instructions on only one variable or constant. Normally you would write something like this.
variable = variable + 1; Which is saying, add to the constant with the value of 1 to the value stored in the variable and then set that operation’s stored result as a new value to the variable. But you can write that shorter like this: variable++;
This video covers the universal univery operators like ++,–, negative -, plus +, logical !, and tidle ~. There is also typeOf and void but not all languages use this and therefore I won’t go into those here.
Add comment