Difference between revisions of "Mutation Operators"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' android | + | '''<translate>Supported platforms</translate>:''' [[File:Platform android]][[File:Platform ios]][[File:Platform mac]][[File:Platform pc]]<br/> |
− | '''Available since:''' Gideros 2017.11<br/> | + | '''<translate>Available since</translate>:''' Gideros 2017.11<br/> |
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> |
Revision as of 09:29, 24 August 2018
Supported platforms: File:Platform androidFile:Platform iosFile:Platform macFile:Platform pc
Available since: Gideros 2017.11
Description
Operators to mutate a value.
a += b Add 'b' to 'a'.
a -= b Subtract 'b from 'a'.
a *= b Multiply 'a' by 'b', result in 'a'.
a /= b Divide 'a' by 'b', result in 'a'.
a %= b The result of 'a%b' is placed in 'a'.
a ^= b The result of 'a^b' is placed in 'a'. ^ is faster than a=math.pow(a,b)
Examples
Simple larger example
score+=1 -- faster and less typing than score=score+1
Methods |
EventsConstants |