Slope
Feb 15 2009, 1:06 am
By: stickynote  

Feb 17 2009, 6:25 pm NudeRaider Post #21

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Wow guys... don't overcomplicate it.
unsigned and signed does NOT change how the values are stored or read, but how they are interpreted. That's simply a definition that tells the computer how to convert the bits and bytes it reads into a decimal number.




Feb 17 2009, 6:28 pm Falkoner Post #22



Quote
unsigned and signed does NOT change how the values are stored or read, but how they are interpreted. That's simply a definition that tells the computer how to convert the bits and bytes it reads into a decimal number.

I know that, but the issue is that a lot of math operations, such as At Least or At Most, like SC has, will have issues with using an unsigned integer instead, since while it's technically negative, the actual function will return as if it is positive.



None.

Feb 17 2009, 11:38 pm O)FaRTy1billion[MM] Post #23

👻 👾 👽 💪

As far as I know At Least is signed.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 18 2009, 2:07 am Falkoner Post #24



Quote
As far as I know At Least is signed.

So how does that work? It just considers anything under 2147483648 positive and anything over is negative?



None.

Feb 18 2009, 3:56 am O)FaRTy1billion[MM] Post #25

👻 👾 👽 💪

Anything with Bit 31 set is negative. Let me actually test my claim that DCs are signed...

Ok, so apparently they are unsigned (unless my testing triggers were flawed)... Luckily, though, you can do like At Least (normal, negative value) and as long as the value can't be >= 0 it will be accurate... if the value can be positive, you need more conditions.

Post has been edited 2 time(s), last time on Feb 18 2009, 4:04 am by FaRTy1billion.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 18 2009, 4:31 am Falkoner Post #26



Quote
Ok, so apparently they are unsigned (unless my testing triggers were flawed)... Luckily, though, you can do like At Least (normal, negative value) and as long as the value can't be >= 0 it will be accurate... if the value can be positive, you need more conditions.

Ah, I knew they were unsigned, hence my argument, I just didn't think about using a negative number in the at least or whatever part, that kinda clears things up, although there are still a few bugs with that.



None.

Feb 20 2009, 5:37 am O)FaRTy1billion[MM] Post #27

👻 👾 👽 💪

You can still subtract past 0, though. As I said, it is exactly the same.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 20 2009, 4:21 pm Falkoner Post #28



Quote
You can still subtract past 0, though. As I said, it is exactly the same.

Yeah, I knew you could, I just thought that errors with the number technically being positive, but not negative, might cause issues with some math operations using At least or At most.



None.

Feb 21 2009, 4:51 am rockz Post #29

ᴄʜᴇᴇsᴇ ɪᴛ!

So then, let me get this straight:

If you "subtract" a number, and it's less than 0, it will be set to 0.

If you "add" a number which has the 31st bit set (negative), it will subtract the two like this:
_1111 1111 1111 1111 1111 1111 1111 1111 = -1
+0000 0110 1011 1011 0000 0011 0101 0001 = 1622868817
=0000 0110 1011 1011 0000 0011 0101 0000 = 1622868816
The 1 on bit 32 drops out because there is no bit 32.

When you use the "at least" or "at most" argument, it does not check for 31st bit, and means that any negative number will be considered higher than a positive number (see above -1 in binary > 1622868817 in binary). Due to the way the negatives work, -1 in binary > -18564842 in binary, so if the number is only negative or only positive, the two arguments work fine.

Did I miss anything?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Feb 21 2009, 5:22 pm stickynote Post #30



I am so confused. I think TZ's idea was much more simple.



None.

Feb 21 2009, 11:30 pm Falkoner Post #31



Quote
When you use the "at least" or "at most" argument, it does not check for 31st bit, and means that any negative number will be considered higher than a positive number (see above -1 in binary > 1622868817 in binary). Due to the way the negatives work, -1 in binary > -18564842 in binary, so if the number is only negative or only positive, the two arguments work fine.

I think so, that's what I was discussing with Farty, so if you are needing to use negatives this way, you can't use those conditions as well.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
[2024-5-22. : 6:10 am]
Riney -- Somethings never change.
[2024-5-22. : 6:10 am]
Riney -- I come back after 4 months. Post wob. Make a crappy post in Null. Hit a 0 in magic boxes.
[2024-5-22. : 6:00 am]
Riney -- :wob:
[2024-5-20. : 3:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[2024-5-20. : 4:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[2024-5-20. : 4:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
Please log in to shout.


Members Online: Sylph-Of-Space, jjf28