1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32math.inl Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,141 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\include\e32math.inl
1.18 +//
1.19 +//
1.20 +
1.21 +#if !defined(__E32MATH_INL__)
1.22 +#define __E32MATH_INL__
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +// class TRealX
1.28 +
1.29 +TBool TRealX::operator==(const TRealX &aVal) const
1.30 +/**
1.31 +@publishedAll
1.32 +@released
1.33 +
1.34 +Compares this extended precision number for equality with another.
1.35 +
1.36 +@param aVal A reference to the extended precision value to be compared.
1.37 +
1.38 +@return True, if this extended precision number is equal to aVal;
1.39 + false, otherwise.
1.40 +*/
1.41 + {
1.42 + return(Compare(aVal)&EEqual);
1.43 + }
1.44 +
1.45 +
1.46 +
1.47 +
1.48 +TBool TRealX::operator!=(const TRealX &aVal) const
1.49 +/**
1.50 +@publishedAll
1.51 +@released
1.52 +
1.53 +Compares this extended precision number for in-equality with another.
1.54 +
1.55 +@param aVal A reference to the extended precision value to be compared.
1.56 +
1.57 +@return True, if this extended precision number is not equal to aVal;
1.58 + false, otherwise.
1.59 +*/
1.60 + {
1.61 + return!(Compare(aVal)&EEqual);
1.62 + }
1.63 +
1.64 +
1.65 +
1.66 +
1.67 +TBool TRealX::operator>=(const TRealX &aVal) const
1.68 +/**
1.69 +@publishedAll
1.70 +@released
1.71 +
1.72 +Compares this extended precision number for being greater than
1.73 +or equal to another.
1.74 +
1.75 +@param aVal A reference to the extended precision value to be compared.
1.76 +
1.77 +@return True, if this extended precision number is greater than or equal
1.78 + to aVal, false, otherwise.
1.79 +*/
1.80 + {
1.81 + return(Compare(aVal)&(EEqual|EGreaterThan));
1.82 + }
1.83 +
1.84 +
1.85 +
1.86 +
1.87 +TBool TRealX::operator<=(const TRealX &aVal) const
1.88 +/**
1.89 +@publishedAll
1.90 +@released
1.91 +
1.92 +Compares this extended precision number for being less than
1.93 +or equal to another.
1.94 +
1.95 +@param aVal A reference to the extended precision value to be compared.
1.96 +
1.97 +@return True, if this extended precision number is less than or equal
1.98 + to aVal, false, otherwise.
1.99 +*/
1.100 + {
1.101 + return(Compare(aVal)&(ELessThan|EEqual));
1.102 + }
1.103 +
1.104 +
1.105 +
1.106 +
1.107 +TBool TRealX::operator>(const TRealX &aVal) const
1.108 +/**
1.109 +@publishedAll
1.110 +@released
1.111 +
1.112 +Compares this extended precision number for being greater than
1.113 +another.
1.114 +
1.115 +@param aVal A reference to the extended precision value to be compared.
1.116 +
1.117 +@return True, if this extended precision number is greater than aVal,
1.118 + false, otherwise.
1.119 +*/
1.120 + {
1.121 + return(Compare(aVal)&EGreaterThan);
1.122 + }
1.123 +
1.124 +
1.125 +
1.126 +
1.127 +TBool TRealX::operator<(const TRealX &aVal) const
1.128 +/**
1.129 +@publishedAll
1.130 +@released
1.131 +
1.132 +Compares this extended precision number for being less than
1.133 +another.
1.134 +
1.135 +@param aVal A reference to the extended precision value to be compared.
1.136 +
1.137 +@return True, if this extended precision number is less than aVal,
1.138 + false, otherwise.
1.139 +*/
1.140 + {
1.141 + return(Compare(aVal)&ELessThan);
1.142 + }
1.143 +
1.144 +#endif