Trunc: Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
mNo edit summary
m (recategorized as basic mechanics)
Line 7: Line 7:
See [[:Special:WhatLinksHere/Trunc|what links here]] for more examples.
See [[:Special:WhatLinksHere/Trunc|what links here]] for more examples.


[[category:Real Life]]
[[category:Basic Mechanics]]

Revision as of 11:07, 26 June 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.