Jump to content

Bitshift left right problem


ReFran
 Share

Recommended Posts

Try this:

#cs
JS-Script:
var y = (((1 << 14) >> 1) - 1 - 5446);
WScript.echo(y);

the result is 2745.
#ce

$y = BitShift(BitShift(1, -14), 1) - 1 - 5446
MsgBox(0, "Bitshit", $y)

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

@JLogan3o13: indeed, I did the same thing as you already did...didn't saw your post!

Br,

UEZ :)

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

@BlueDrache

... (hint ... click the name of the function)

I did try that, but didn't got the right result.

@JLogan3o13

Many thanks for your help. I searched now tor 3 days how I can show a Yahoo map using Googles Map Api (the zoom factor and the y coord somewho revers). Finaly I found a phyton script which I translated - with some problems - to JS (for use in a html page). Now I want to use it also for my au3 map download tool. I tried already "$n = Bitshift(Bitshift(14,1),-1) -1 -5446", but didn't work correctly. So I thought before I spent further 3 day on a solution, here may be one who can solve it quicker.

So thank you very much for saving time and more endless testing. Works pefect.

@UEZ

Thanks for confirmation.

You are right I will take Y because it's the Y coord ;-)

best regards, Reinhard

Edited by ReFran
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...