|
1 /* |
|
2 * Copyright (c) 2005 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:Provides functions to compare two TReal values. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef POSLMTREALCOMPARE_H |
|
20 #define POSLMTREALCOMPARE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32math.h> |
|
24 |
|
25 // CONSTANTS |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Provides functions to compare two TReal values. |
|
33 */ |
|
34 class PosLmTrealCompare |
|
35 { |
|
36 |
|
37 public: // New functions |
|
38 |
|
39 /** |
|
40 * Compares two real values. Also compares with NaN. |
|
41 * If aReal1 == NaN == aReal2, ETrue is returned. |
|
42 * |
|
43 * @param aReal1 A real value. |
|
44 * @param aReal2 A real value. |
|
45 * @return ETrue if equal, otherwise EFalse. |
|
46 */ |
|
47 IMPORT_C static TBool IsEqual( |
|
48 /* IN */ TReal32 aReal1, |
|
49 /* IN */ TReal32 aReal2 |
|
50 ); |
|
51 |
|
52 /** |
|
53 * Compares two real values. Also compares with NaN. |
|
54 * If aReal1 == NaN == aReal2, ETrue is returned. |
|
55 * |
|
56 * @param aReal1 A real value. |
|
57 * @param aReal2 A real value. |
|
58 * @return ETrue if equal, otherwise EFalse. |
|
59 */ |
|
60 IMPORT_C static TBool IsEqual( |
|
61 /* IN */ TReal64 aReal1, |
|
62 /* IN */ TReal64 aReal2 |
|
63 ); |
|
64 |
|
65 /** |
|
66 * Compares two real values. Also compares with NaN. |
|
67 * If aReal1 == NaN == aReal2, ETrue is returned. |
|
68 * |
|
69 * @param aReal1 A real value. |
|
70 * @param aReal2 A real value. |
|
71 * @return ETrue if equal, otherwise EFalse. |
|
72 */ |
|
73 IMPORT_C static TBool IsEqual( |
|
74 /* IN */ TRealX aReal1, |
|
75 /* IN */ TRealX aReal2 |
|
76 ); |
|
77 |
|
78 }; |
|
79 |
|
80 #endif // POSLMTREALCOMPARE_H |
|
81 |
|
82 // End of File |