Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
mozaic_tips_and_tricks [2020/01/12 21:10] – Updated overview _ki | mozaic_tips_and_tricks [2020/01/12 21:16] – [Store two positive Values into a single Variable] _ki | ||
---|---|---|---|
Line 70: | Line 70: | ||
< | < | ||
- | | + | |
- | valA | + | valA = 723 // allowed range 0 .. ~16000 |
- | varB | + | varB = 124 // allowed range 0 .. 999 |
| | ||
- | combinedValue = valA * offset | + | combinedValue = valA * maxB+ valB |
</ | </ | ||
To later extract the values from their packed format use | To later extract the values from their packed format use | ||
< | < | ||
- | valA = RoundDown combinedValue / offset | + | valA = RoundDown combinedValue / maxB |
- | valB = combinedValue % offset | + | valB = combinedValue % maxB |
</ | </ | ||
\\ | \\ |