Trunc: Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
m (1 revision: Krakiipedia Import)
mNo edit summary
Line 5: Line 5:
<div {{prettydiv}}>For this example we'll use a "current plus" of 20 (the item is standard 4x enchanted).<br>1200 + (400 * trunc((20 - 11) / 5))) = 1200 + (400 * trunc(9/5)) = 1200 + (400 * '''trunc(1.8)''') = 1200 + (400 * 1) = 1200 + 400 = '''1600'''</div>
<div {{prettydiv}}>For this example we'll use a "current plus" of 20 (the item is standard 4x enchanted).<br>1200 + (400 * trunc((20 - 11) / 5))) = 1200 + (400 * trunc(9/5)) = 1200 + (400 * '''trunc(1.8)''') = 1200 + (400 * 1) = 1200 + 400 = '''1600'''</div>


See [[:Special:WhatLinksHere/Trunc|what links here]] for more examples.


[[category:Real Life]]
[[category:Real Life]]

Revision as of 16:22, 11 January 2015

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

See what links here for more examples.