[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>what the fuck? What did he mean by this?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /v/ - Video Games

Thread replies: 28
Thread images: 2
File: inverse square root.jpg (42 KB, 708x306) Image search: [Google]
inverse square root.jpg
42 KB, 708x306
>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?
>>
File: 1300044776986.jpg (17 KB, 250x250) Image search: [Google]
1300044776986.jpg
17 KB, 250x250
>>333820889
>>
>>333820593
It's C, he's doing some kind of bit shifting, but for what purpose fuck knows.
>>
>>333820973
>>333820865
>>
>>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.
Thread replies: 28
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.