Gocator API

- Home
- Categories
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Groups Pages
GoUtils.h
Go to the documentation of this file.
1 /**
2 * @file GoUtils.h
3 * @brief Contains various helper functions.
4 *
5 * @internal
6 * Copyright (C) 2014 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_SDK_UTILS_H
11 #define GO_SDK_UTILS_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <math.h>
15 kBeginHeader()
16
17 /**
18 * Returns true if input is within min and max.
19 */
20 #define GoUtils_MinMax_(in, min, max) \
21 (((in) > (max) || (in) < (min)) ? (kFALSE) : (kTRUE))
22
23 /**
24 * Returns the result of a floating point number equivalence, based on a given degree of precision.
25 *
26 * @public @memberof GoUtils
27 * @param first k64f object.
28 * @param second k64f object.
29 * @param decimalPrecision k8u object.
30 * @return Returns kTRUE if the numbers are equivalent within the given precision; kFALSE otherwise.
31 */
32 GoFx(kBool) GoUtils_FuzzyEquivalence(k64f first, k64f second, k8u decimalPrecision);
33
34 kEndHeader()
35 #include <GoSdk/GoUtils.x.h>
36
37 #endif
GoSdkDef.h
Essential SDK declarations.
kBeginHeader
kBeginHeader() kStatus GoSdk_Construct(kAssembly *assembly)
Constructs the Gocator SDK library.