|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include <e32std.h> |
|
18 |
|
19 class GfxMath |
|
20 { |
|
21 private: |
|
22 |
|
23 class TGfxInt64 |
|
24 { |
|
25 public: |
|
26 TInt32 l; /* low part */ |
|
27 TInt32 h; /* high part */ |
|
28 } ; |
|
29 |
|
30 public: |
|
31 static TInt svgScalarSin( TInt r1 ); |
|
32 static TInt svgScalarCos( TInt r1 ); |
|
33 static TInt svgScalarTan( TInt r1 ); |
|
34 private: |
|
35 static TInt32 hgAbs32( TInt32 x ); |
|
36 static TUint32 hgMulu64h (TUint32 a, TUint32 b); |
|
37 static TGfxInt64 hgMulu64 (TUint32 a, TUint32 b); |
|
38 static TGfxInt64 hgMul64 (TInt32 a, TInt32 b); |
|
39 static TGfxInt64 hgMadd64 (TGfxInt64 a, TInt32 b, TInt32 c); |
|
40 static TGfxInt64 hgSet64(TInt32 hh,TInt32 ll); |
|
41 static TInt32 hgLsl64h_0_31 (const TGfxInt64 a, TInt32 sh); |
|
42 static TInt svgiRCos( TInt32 _x ); |
|
43 static TGfxInt64 hgAdd64 (const TGfxInt64 a, const TGfxInt64 b); |
|
44 static TInt32 hgMul64h (TInt32 a, TInt32 b); |
|
45 static TInt32 hgGet64h (const GfxMath::TGfxInt64 a); |
|
46 };// class GfxMath |