gwnavruntime/navmesh/navmeshutils.h Source File

navmeshutils.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 // ---------- Primary contact: JUBA - secondary contact: NOBODY
9 #ifndef Navigation_NavMeshUtils_H
10 #define Navigation_NavMeshUtils_H
11 
12 
14 
15 
16 namespace Kaim
17 {
23 KY_INLINE void GetMinMax(const KyFloat32 a, const KyFloat32 b, KyFloat32& minValue, KyFloat32& maxValue)
24 {
25  minValue = Kaim::Min(a, b);
26  maxValue = Kaim::Max(a, b);
27 }
28 
35 KY_INLINE void GetMinMax(const KyFloat32 a, const KyFloat32 b, const KyFloat32 c, KyFloat32& minValue, KyFloat32& maxValue)
36 {
37  minValue = Kaim::Min(Kaim::Min(a, b), c);
38  maxValue = Kaim::Max(Kaim::Max(a, b), c);
39 }
40 
48 KY_INLINE void GetMinMax(const KyFloat32 a, const KyFloat32 b, const KyFloat32 c, const KyFloat32 d, KyFloat32& minValue, KyFloat32& maxValue)
49 {
50  minValue = Kaim::Min(Kaim::Min(a, b), Kaim::Min(c, d));
51  maxValue = Kaim::Max(Kaim::Max(a, b), Kaim::Max(c, d));
52 }
53 
54 }
55 
56 #endif
57 
T Min(const T &a, const T &b)
Returns the lesser of the two specified values.
Definition: fastmath.h:113
T Max(const T &a, const T &b)
Returns the greater of the two specified values.
Definition: fastmath.h:121
Definition: gamekitcrowddispersion.h:20
void GetMinMax(const KyFloat32 a, const KyFloat32 b, KyFloat32 &minValue, KyFloat32 &maxValue)
Retrieves the minimum and maximum values from the specified inputs.
Definition: navmeshutils.h:23
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43