### Author Topic: 2d world size  (Read 1298 times)

#### Hemlos

• To boldy go where no pixel has gone before!
• Global Moderator
• Prof. Inline
• Posts: 1634
• Particle Hawk
##### 2d world size
« on: 2009-Jul-18 »
Is there a size limit - + to the 2d world....

i was firing some particles at lightspeed and i got shot in the back lol.

Does it wrap, or is my rounding function flipping the sign of the coordinate?

Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

• Guest
##### Re: 2d world size
« Reply #1 on: 2009-Jul-18 »
To what 2D World are you referring ?

#### Moru

• Prof. Inline
• Posts: 1773
##### Re: 2d world size
« Reply #2 on: 2009-Jul-18 »
There are usually two things that can happen when you go past the limit of a numberstorage. Either you get an overflow error or it wraps back to the other side of the extreme you just passed. I'm not sure how GLBasic does it though.

#### Hemlos

• To boldy go where no pixel has gone before!
• Global Moderator
• Prof. Inline
• Posts: 1634
• Particle Hawk
##### Re: 2d world size
« Reply #3 on: 2009-Jul-19 »
There are usually two things that can happen when you go past the limit of a numberstorage. Either you get an overflow error or it wraps back to the other side of the extreme you just passed. I'm not sure how GLBasic does it though.
Right you are, one of those.

I dont think its an overflow error, it seems to be wrapping....i was curious to know what the extreme ranges are.

Its not a problem, its just an observation, i will create my own ranges.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

#### Hemlos

• To boldy go where no pixel has gone before!
• Global Moderator
• Prof. Inline
• Posts: 1634
• Particle Hawk
##### Re: 2d world size
« Reply #4 on: 2009-Sep-04 »

- 2147.483648 to 2147.483648 for both planes is the range.

Note: if your 2d object exceeds the positive number, it becomes negative, for the plane X Y in question.
Also note, that this only happens when the +max is exceeded, not in negative direction.
If it is exceeded in negative direction, it becomes 0.

Ill create limits as needed.
This is just an observation, not a requst for any changes.
« Last Edit: 2009-Sep-04 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)