Off Topic > Off Topic
Programming Megathread
<< < (175/241) > >>
$trinick:
Casting a positive float to an int is the fastest way to floor it.
Timestamp:

--- Quote from: Timestamp on August 27, 2016, 06:14:05 AM ---do any of you guys use programmr.com as a learning site also?

--- End quote ---

ill just ask again
Headcrab Zombie:
I love seeing the silly things people do in code

I remember seeing in our code base at work a (0).ToString() instead of just a "0"
McJob:

--- Quote from: $trinick on September 12, 2016, 05:32:41 PM ---Casting a positive float to an int is the fastest way to floor it.

--- End quote ---
True, and I'm used to C-style casts since that's what I started with, but I think in my C# experience, other people prefer when you're a bit more explicit about how scenarios like this should work, so using .Floor() or .Ceil() tells you exactly what's going to happen.
Pecon:
If any of you are crypto nerds and are interested in Keybase, send me a PM because I have 7 alpha invites.

tl;dr: It's a social-ish network that lets you connect your pgp key to social media accounts.
Navigation
Message Index
Next page
Previous page

Go to full version