• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Math Accuracy

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

How would I calculate the accuracy of fired shots?

Var A = total shots
Var B = hit shots
Var C = missed shots

Like if I have A = 65 which is 100% accuracy, B = 43 which are shots that hit a target and C = 12 which are shots fired that missed. How would I show in percentage what the accuracy is?
 

sentrywiz

S

sentrywiz

(hit shots/total shots) * 100

Did you sleep in school math :eekani:?

As a matter of fact I did, couple of times.
And we studied stuff we don't usually need in life, like Pythagoras and multiplying roots. Because yeah, I really need that cube root of a number.

Thanks a lot anyway. +rep

That is a bit rude. Some people excel in different areas.

@OP
Ezekiels option is good.

You can also do B * 100 / A
Both will give you the same answer.

True, we all have our own interests. + rep for your second solution

Both work great.
 
Level 25
Joined
May 11, 2007
Messages
4,650
As a matter of fact I did, couple of times.
And we studied stuff we don't usually need in life, like Pythagoras and multiplying roots. Because yeah, I really need that cube root of a number./QUOTE]
You do need pythagoras later in life if you plan on learning game programming or linear math, for example the distance between two points = usage of pythagoras.

Just saying :)
 

EdgeOfChaos

E

EdgeOfChaos

As a matter of fact I did, couple of times.
And we studied stuff we don't usually need in life, like Pythagoras and multiplying roots. Because yeah, I really need that cube root of a number.

Thanks a lot anyway. +rep



True, we all have our own interests. + rep for your second solution

Both work great.

What? The Pythagorean theorem is awesome. Without it we wouldn't have things like buildings. And how on Earth are cube roots useless? :vw_wtf:
 

sentrywiz

S

sentrywiz

What? The Pythagorean theorem is awesome. Without it we wouldn't have things like buildings. And how on Earth are cube roots useless? :vw_wtf:

I didn't say they were useless. I said we USUALLY don't need
Not once in my life I found a use for cube root or Pythagoras.
But hey, if you became an architect and are using it, glory to you.

You do need pythagoras later in life if you plan on learning game programming or linear math, for example the distance between two points = usage of pythagoras.

Why, when I have forums like these where people can tell me? I don't need to know everything myself, just need to ask the people who do.

I still haven't jumped into game programming. Maybe Pythagoras will be useful, someday.
 
It will be useful but still when you jump into game programming you just make a function to do all of the math. So you only need to know it once.
Being able to look up the information or ask for help becomes much more prominent than actually needing to know the math. But knowing it is much better when you make your own games as coming up with formulas when you know how the math works becomes much easier.

But no you do not need to know it all.
 

sentrywiz

S

sentrywiz

It will be useful but still when you jump into game programming you just make a function to do all of the math. So you only need to know it once.
Being able to look up the information or ask for help becomes much more prominent than actually needing to know the math. But knowing it is much better when you make your own games as coming up with formulas when you know how the math works becomes much easier.

But no you do not need to know it all.

True, its still better if I know it myself. But like I said, I haven't found any use for Pythagoras or any of the other math stuff I've learned (most of which I've forgotten by now by a lack of practice)

And so far, in all my life experience about games, the most complex math that I've used were fractions and convert to percentage.
 
True, its still better if I know it myself. But like I said, I haven't found any use for Pythagoras or any of the other math stuff I've learned (most of which I've forgotten by now by a lack of practice)

And so far, in all my life experience about games, the most complex math that I've used were fractions and convert to percentage.

That is ok that is all most people do.
 

sentrywiz

S

sentrywiz

Pythagoras(if it is type sorry, I copied it from you) rule is one of most used things I can think of that is kept to pretty low level

I'm not saying its useless, I'm just saying that so far I haven't used it.

Can you perhaps give examples where is it used, besides distance between points?
 
Status
Not open for further replies.
Top