Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avoidability\Miss Formula
#21
yeah i realized that after reading past the SAR explanation , which was the green mushroom example.

you could place the SAR explanation below of everything, so it makes sense in explanation flow.

At first, I thought SAR(5,1) was a constant value.

>> If your level is equal or lower
you can change it to lower only, no need equal
Reply
#22
I understand I'm necroposting, but SAR(X,1) is basically (MobLevel - CharLevel) / 2, then round it down to the nearest whole number.
Reply
#23
Paracelsus Wrote:I understand I'm necroposting, but SAR(X,1) is basically (MobLevel - CharLevel) / 2, then round it down to the nearest whole number.

IIRC it's not round to the nearest, it's round down.
Reply
#24
"Round it down to the nearest"
Yes.

Alternatively, integer division by 2.
Reply
#25
Paracelsus Wrote:I understand I'm necroposting, but SAR(X,1) is basically (MobLevel - CharLevel) / 2, then round it down to the nearest whole number.

I said down, lol.

So anymore projects you working on?
Reply
#26
SAR has a lot of names.

For positive y, can be defined as
SAR(x,y) = x >> y = floor(x/pow(2, y))
SAR(x, -y) = x << y = x * pow(2, y)

And so forth. Also named bitshifting.
Reply
#27
Devil's Sunrise Wrote:SAR has a lot of names.

For positive y, can be defined as
SAR(x,y) = x >> y = floor(x/pow(2, y))
SAR(x, -y) = x << y = x * pow(2, y)

And so forth. Also named bitshifting.

and additionally according to the magical numbers rules, each whole positive 32bit integer "a" between 2 and 4,294,967,295 has a magical number m and a shift count s that make the equation (x / a) == SHR((x * m), (s + 32)) where x is a whole signed 32bit integer.

Computer mathematics, pineapple yea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)