85

Okay, we all ranters love pizza, right?

TIL something that we should ALL keep in mind while buying pizza.

One 18 inch pizza has more pizza than two 12 inch pizzas.

if ((3.142*9*9) > (2*3.142*6*6)) {
return buyPizza(18inch, 1);
} else {
/* stop being an imbecile. This is dead code */
}

Comments
  • 9
    Well, to be precise (and a nitpicker), as long as one pizza's diameter is more than 1.42 times that of another pizza, that condition holds true. So a 17.04" pizza would be sufficient, but let's be honest, we all want that 0.96 inch too, that's 11% more pizza !
  • 7
    You haven't taken the crust into account. That's another plus for the bigger diameter:

    (3.142*9*9) - (3.142*(9-0.5)*(9-0.5)) = 27,49
    (2*3.142*6*6) - (2*3.142*(6-0.5)*(6-0.5)) = 36,13

    That's 3% more spread on the big diameter.

    Bon apetit!
  • 4
    one of my fav !rants :)
  • 2
    @ddephor Except if you buy pizza and you like the crust more than the spread part
  • 2
    The most useful thing I've read all day...
  • 6
    @GodHatesMe god must really hate you. :-P
  • 5
    @GodHatesMe first of all, u are*

    It was just a random sticker. Not everything is about you :P (kidding)

    We all ranters took an opportunity to make fun of your username and we took it!

    You okay, right?
  • 5
    Another day, another new js framework
  • 5
    We all love @Pizza.
  • 3
    @shellbug I'm flattered
  • 4
    Nobody askin what buyPizza() returns?😞
  • 5
    My girlfriend and I did the math too last Saturday. Not that it's difficult but doing math together just to order pizza... She's great :)
  • 6
    @daintycode it returns a promise for a pizza.
  • 2
    @runfrodorun oh my, I need to try this locally!
  • 0
    @runfrodorun would you mind putting this on github?
    I'm trying to get into scripting and this sounds like a delicious entry point.
    Btw which pizza related utility exists in UNIX-like systems?
Add Comment