Mercurial > projects > dstep
view dstep/coreservices/carboncore/FixMath.d @ 27:57371c29ef73 default tip
ObjcWrap is now automatically mixed in. Added support for building as a dylib with DMD.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 09 Apr 2010 23:00:22 +0200 |
parents | 07194b026fa4 |
children |
line wrap: on
line source
/** * 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); }