November 19th, 2008, 01:11 PM
what does this << mean?
Looking at an example of drawing rounded rectangles, I see this:
What does this do? I know it is a shift operator, but what is this doing?
int d = raius << 1;
November 19th, 2008, 01:33 PM
Re: what does this << mean?
Pefroming a shift to the left by one bit. It is basic binary methamatics and is equivilant to a *2 when applied to an integral type (but often faster - althought the compiler may internally optimize a *2 into a <<1)
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
In theory, there is no difference between theory and paractice; in practice there is.
* Join the fight, refuse to respond to posts that contain code
outside of [code] ... [/code]
tags. See here
* How NOT
to post a question here
* Of course you read this
carefully before you posted
* Need homework help? Read this first
Click Here to Expand Forum to Full Width