CODE
rotation IntIntFloat2Rot(integer int1, integer int2, float float1)
{
return <int1 >> 11, int2 >> 11, ((int1 & 2047) << 11) | (int2 & 2047), float1>;
}
Then later recalling the rotation and converting it back into a list with...
CODE
list Rot2IntIntFloat(rotation in)
{
return [((integer)in.x << 11) | ((integer)in.z >> 11), ((integer)in.y << 11) | ((integer)in.z & 2047), in.s];
}
...which would return the original 2 integers and the float would allow you to store quite a bit more data. What I'm wondering is can anybody else think of a way to store more in a single script? The only other thing I can think of is converting the integer into a Hex string that would be in the format of a serialization float. Then you could store the integers as floats in a vector. But this would probably take quite a bit longer to convert back and forth.
in an almost empty script that would keep adding the 2 integers and a float sets on a list allowed me to store 160 set while the using rotations method gave me 290. Just food for thought.