>what the fuck?
What did he mean by this?
>>333820593
What game?
>>333820593
What fucking abomination of programming language is that?
>>333820593
Is this the Carmack thing?
>>333820727
looks like C / C++ to me senpai
>not knowing what that equation is
fuck off gayumers
>>333820785
It wasn't really him, but people think he did it.
What am I looking at here? Dimensions?
>>333820661
Quake
It was used as a faster way of calculating lighting in the engine
>>333820727
Are you a retard? That's one of the most generic looking pieces of code. Obviously the written code's actual function isn't generic before people call me out.
anyone else like playing games?
>>333820727
Looks like C, what kind of fucked up programming language(s) are you familiar with?
>>333820889
>>333820593
It's C, he's doing some kind of bit shifting, but for what purpose fuck knows.
>>333820917
This is nothing like based Haskell, what the fuck man.
>>333820973
>>333820865
Specifically, it calculates the inverse square root of a number.
>>333821053
>based Haskell
>Haskell
>based
>>333821053
>functional languages
What are you, some kind of hipster?
>>333820593
I fail to understand the point of defining a constant number that is equal to 1.5, instead of just using 1.5.
>>333821659
Magic numbers make for unreadable code, much like 0x5f3759df appropriately nicknamed "what the fuck?"
>>333821659
It's probably a preprocessor replacement in the actual code, and they just wanted to make it clearer for this example.
>>333821659
CLEAN CODE
L
E
A
N
C
O
D
E
>>333821128
>Falling for /g/ memes
>>333820865
It wasnt, it just calculated the inverse square root?
>People credit this to Carmack
>>333821128
haskell is a pretty interesting language my kouhai
though you should really get wiith the agda, the true future of game development and financial engineering
>>333822712
And you have to do a lot of those to calculate the angles needed for lighting and reflections.