المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Using Exponentiation Operator ^ on Deciaml



C# Programming
05-17-2009, 11:50 PM
So I'm trying to workout a Chance on how often you would Die in a game with a push and every push had a 6% death with the Code I'm trying to use is

Death1 = (1 - Death) ^ HKill;

Yet you aren't allowed to use ^ on 'decimal' and 'decimal'.

I need to use decimals as 'int' wouldn't give a a true enough number to work with, any one know a formula that would do the above operation?