source: NonGTP/FCollada/FMath/FMInteger.h @ 964

Revision 964, 1.7 KB checked in by igarcia, 19 years ago (diff)
Line 
1/*
2        Copyright (C) 2005-2006 Feeling Software Inc.
3        MIT License: http://www.opensource.org/licenses/mit-license.php
4*/
5
6/**
7        @file FMInteger.h
8        The file containing functions and constants for integer values.
9 */
10
11/** A dynamically-sized array of 32-bit signed integer values. */
12typedef vector<int32> Int32List;
13/** A dynamically-sized array of 32-bit unsigned integer values. */
14typedef vector<uint32> UInt32List;
15/** A dynamically-sized array of 16-bit unsigned integer values. */
16typedef vector<uint16> UInt16List;
17/** A dynamically-sized array of 8-bit unsigned integer values. */
18typedef vector<uint8> UInt8List;
19/** A dynamically-sized array of 8-bit signed integer values. */
20typedef vector<int8> Int8List;
21/** A dynamically-sized array of boolean values. */
22typedef vector<bool> BooleanList;
23
24/** Returns whether two signed or unsigned integers are equivalent.
25        For integers, this function simply wraps around the operator==.
26        @param i1 A first integer.
27        @param i2 A second integer.
28        @return Whether the two integers are equivalent. */
29inline bool IsEquivalent(int8 i1, int8 i2) { return i1 == i2; }
30inline bool IsEquivalent(uint8 i1, uint8 i2) { return i1 == i2; } /**< See above. */
31inline bool IsEquivalent(int16 i1, int16 i2) { return i1 == i2; } /**< See above. */
32inline bool IsEquivalent(uint16 i1, uint16 i2) { return i1 == i2; } /**< See above. */
33inline bool IsEquivalent(int32 i1, int32 i2) { return i1 == i2; } /**< See above. */
34inline bool IsEquivalent(uint32 i1, uint32 i2) { return i1 == i2; } /**< See above. */
35inline bool IsEquivalent(int64 i1, int64 i2) { return i1 == i2; } /**< See above. */
36inline bool IsEquivalent(uint64 i1, uint64 i2) { return i1 == i2; } /**< See above. */
37
Note: See TracBrowser for help on using the repository browser.