Basically, the Advanced Long Range scanner here has issues displaying things at fractions of angles (say, 81.3 degrees). Is there any way to feed a number into Trans so that it does display at decimal angles?
Is there another way?
How to fake floating point?
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
There is no way to do anything with floating points.
However, fixed point is a possibility. Start by multiplying the data you wish to deal with by some number, maybe 100, maybe 1000, maybe 10,000. Then, do math in this higher resolution. When you wish to display or use that data, you can get the modulo of the data in some other more usable value, and then keep the remainder stored for the next turn.
I used a technique like this in the code for the Singularity Proof of Concept. Look at the code for it (although, it's really out of date and likely doesn't work on the current version).
However, fixed point is a possibility. Start by multiplying the data you wish to deal with by some number, maybe 100, maybe 1000, maybe 10,000. Then, do math in this higher resolution. When you wish to display or use that data, you can get the modulo of the data in some other more usable value, and then keep the remainder stored for the next turn.
I used a technique like this in the code for the Singularity Proof of Concept. Look at the code for it (although, it's really out of date and likely doesn't work on the current version).
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
You're Alive!!!!!! (go to IRC sometime will you?)
Sweet, didn't think of the higher resolution.
Sweet, didn't think of the higher resolution.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
- Star Weaver
- Militia Commander
- Posts: 311
- Joined: Sun Nov 07, 2010 10:20 pm
- Location: . . . between the stars and the warm black sky . . .