Mercurial > projects > dstep
diff dstep/coreservices/carboncore/FixMath.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/coreservices/carboncore/FixMath.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,43 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Jul 21, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.coreservices.carboncore.FixMath; + +//import dstep.AvailabilityMacros; +import dstep.coreservices.carboncore.MacTypes; + +extern (C) +{ + int FixRatio (short numer, short denom); + int FixMul (int a, int b); + short FixRound (int x); + int Fix2Frac (int x); + int Fix2Long (int x); + int Long2Fix (int x); + int Frac2Fix (int x); + int FracMul (int x, int y); + int FixDiv (int x, int y); + int FracDiv (int x, int y); + int FracSqrt (int x); + int FracSin (int x); + int FracCos (int x); + int FixATan2 (int x, int y); + double Frac2X (int x); + double Fix2X (int x); + int X2Fix (double x); + int X2Frac (double x); + short WideCompare (wide* target, wide* source); + wide* WideAdd (wide* target, wide* source); + wide* WideSubtract (wide* target, wide* source); + wide* WideNegate (wide* target); + wide* WideShift (wide* target, int shift); + uint WideSquareRoot (wide* source); + wide* WideMultiply (int multiplicand, int multiplier, wide* target); + int WideDivide (wide* dividend, int divisor, SInt32* remainder); + wide* WideWideDivide (wide* dividend, int divisor, SInt32* remainder); + wide* WideBitShift (wide* target, int shift); + uint UnsignedFixedMulDiv (uint value, uint multiplier, uint divisor); +} \ No newline at end of file