Avatar

Interesting Math for K/D (Destiny)

by Cody Miller @, Music of the Spheres - Never Forgot, Monday, September 29, 2014, 18:34 (3517 days ago)

What's going on here?

I finished a match with 18 kills and 1 death. K/D reported as 18.0 as it should. Later, I finished with 18 kills and ZERO deaths. This should produce a nonsensical ratio given the division by zero, but it also displayed as 18.0.

What's going on here? How can the same number of kills but one more death result in the same K/D ratio?

Avatar

I was thinking about that the other day

by ZackDark @, Not behind you. NO! Don't look., Monday, September 29, 2014, 18:37 (3517 days ago) @ Cody Miller

I thought it would divide by 2 if you died once. You know, kills per life, averaged. Guess not...

I was thinking about that the other day

by Blue_Blazer_NZ, Wellington, New Zealand, Monday, September 29, 2014, 18:42 (3517 days ago) @ ZackDark

Most FPS games I've played seem to do this.

Avatar

I was thinking about that the other day

by Cody Miller @, Music of the Spheres - Never Forgot, Monday, September 29, 2014, 18:43 (3517 days ago) @ ZackDark

I thought it would divide by 2 if you died once. You know, kills per life, averaged. Guess not...

Nope. You can confirm given it gives you 1.0 if you have equal kills and deaths.

Avatar

Interesting Math for K/D

by uberfoop @, Seattle-ish, Monday, September 29, 2014, 19:30 (3517 days ago) @ Cody Miller

What's going on here?

// I hate dealing with edge cases

if(player.deaths==0)
{
   player.kd = player.kills; // Cody Miller will probably complain, but whatever
}
else
{
   player.kd = player.kills / player.deaths;
}
Avatar

I was thinking about that the other day

by uberfoop @, Seattle-ish, Monday, September 29, 2014, 19:34 (3517 days ago) @ ZackDark

I thought it would divide by 2 if you died once. You know, kills per life, averaged. Guess not...

People would refer to kills per life as the K/L ratio, not K/D.

Avatar

Interesting Math for K/D

by ncsuDuncan @, Monday, September 29, 2014, 19:39 (3517 days ago) @ Cody Miller

ZERO deaths

Every man dies.

Not every man really lives to get 18 kills.

Avatar

Interesting Math for K/D

by Ragashingo ⌂, Official DBO Cryptarch, Monday, September 29, 2014, 19:42 (3517 days ago) @ uberfoop

// Cody Miller will probably complain, but whatever

Nah. They just put that right at the top of the very first file.

Interesting Math for K/D

by Monochron, Monday, September 29, 2014, 19:45 (3517 days ago) @ uberfoop

I was about to post this exact thing but you beat me to it : )
Good on ya.

Avatar

#include isnotcanon.h

by Beorn @, <End of Failed Timeline>, Monday, September 29, 2014, 19:46 (3517 days ago) @ Ragashingo

- No text -

how this probably went down

by electricpirate @, Tuesday, September 30, 2014, 06:50 (3517 days ago) @ Cody Miller

What's going on here?

I finished a match with 18 kills and 1 death. K/D reported as 18.0 as it should. Later, I finished with 18 kills and ZERO deaths. This should produce a nonsensical ratio given the division by zero, but it also displayed as 18.0.

What's going on here? How can the same number of kills but one more death result in the same K/D ratio?

Here's how this went down.

"Tester: Hey I went 18-0 and the game crashed with a divide by zero exception!"
"Programmer: fixed: if (deaths == 0) deaths++"
"Designer: I'm cool with it."

Avatar

How did the Halos handle it?

by ZackDark @, Not behind you. NO! Don't look., Tuesday, September 30, 2014, 07:38 (3517 days ago) @ Cody Miller

- No text -

Avatar

I don't think they calculated it… just Ks and Ds

by Beorn @, <End of Failed Timeline>, Tuesday, September 30, 2014, 16:35 (3516 days ago) @ ZackDark

- No text -

Back to the forum index
RSS Feed of thread