Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKhatharr

Posted 14 December 2012 - 02:13 AM

Lol @ the article.

[source lang="cpp"]for(int i = 0; i < rects.size(); ++i) rects[i]->set_fill_color((i & 1) ? Color::white : Color::red);[/source]

#5Khatharr

Posted 14 December 2012 - 02:09 AM

Lol @ the article.

#4Khatharr

Posted 14 December 2012 - 02:07 AM

[source lang="cpp"]inline bool isRed(x, y) { return (y & 1) ? (x & 1) : (!(x & 1));}[/source]

?

Edit - Ah, I see what you did with the addition there Alvaro.

So...
[source lang="cpp"]inline bool isRed(x, y) { return !((x+y) & 1);}[/source]

#3Khatharr

Posted 14 December 2012 - 02:05 AM

[source lang="cpp"]inline bool isRed(x, y) { return (y & 1) ? (x & 1) : (!(x & 1));}[/source]
?

#2Khatharr

Posted 14 December 2012 - 02:03 AM

[source lang="cpp"]inline bool isRed(x, y) {return (y & 1) ? (x & 1) : (!(x & 1));}[/source]
?

#1Khatharr

Posted 14 December 2012 - 02:02 AM

[source lang="cpp"]bool isRed(x, y) { return (y & 1) ? (x & 1) : (!(x & 1));}[/source]
?

PARTNERS