Y
Hacker News
new
|
ask
|
show
|
jobs
by
Orangeair
4453 days ago
Why on earth would they create a named constant for 1.5F, but not for 0x5f3759df?
1 comments
jws
4453 days ago
What would you name it?
#define AND_THEN_A_MIRACLE_OCCURS (0x5f3759df)
link
Orangeair
4452 days ago
Fair enough. Still, it seems silly to name a constant THREE_HALVES. What information does that add over 1.5? What happens if you change it and it becomes wrong?
link
officialjunk
4453 days ago
MAGIC_NUMBER?
link