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?Code:int d = raius << 1;
Mike B
Printable View
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?Code:int d = raius << 1;
Mike B
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)