Trunc: Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
(I've heard this question so many times, which makes me sad panda.)
(No difference)

Revision as of 12:08, 17 July 2014

Trunc is a mathematical term that is short for truncate and appears frequently in GemStone IV equations that do everything from figuring out a character's mana point total to how many premium points it costs to enchant an item. For GemStone IV purposes, when one truncates, he/she removes all decimal places after the whole number (integer) without rounding. Thus, 6.1 and 6.9 would both be 6 when truncated.

Example
Enchanting plain item (+5 added) with a starting enchant bonus of +16 to +45
1200 + (400 * trunc((current plus - 11) / 5)))= Total premium points required


For this example we'll use a "current plus" of 20 (the item is standard 4x enchanted).
1200 + (400 * trunc((20 - 11) / 5))) = 1200 + (400 * trunc(9/5)) = 1200 + (400 * trunc(1.8)) = 1200 + (400 * 1) = 1200 + 400 = 1600