Thread: Inverting Axis
View Single Post
  #12   Spotlight this post!  
Unread 02-02-2015, 12:06
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,725
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Inverting Axis

Quote:
Originally Posted by Ether View Post
Is this just a matter of aesthetics, or does it actually generate more efficient code?


That is a question I do not know the answer to. I'm assuming that it is just aesthetic. You are technically using the unary minus operator in both situations because the - in front of the 1 is technically inverting the value of 1.

It is however better practice to place the - in front of the variable instead of multiplying by -1.
Reply With Quote