[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / input / InputTranslator.h
blob28e85c2e5aec0527d4a64cf13a98def7b7b70dfe
1 /*
2 * Copyright (C) 2018-2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "InputTypes.h"
13 namespace KODI
15 namespace INPUT
17 class CInputTranslator
19 public:
20 /*!
21 * \brief Get the closest cardinal direction to the given vector
23 * This function assumes a right-handed cartesian coordinate system; positive
24 * X is right, positive Y is up.
26 * Ties are resolved in the clockwise direction: (0.5, 0.5) will resolve to
27 * RIGHT.
29 * \param x The x component of the vector
30 * \param y The y component of the vector
32 * \return The closest cardinal direction (up, down, right or left), or
33 * CARDINAL_DIRECTION::NONE if x and y are both 0
35 static CARDINAL_DIRECTION VectorToCardinalDirection(float x, float y);
37 /*!
38 * \brief Get the closest cardinal or intercardinal direction to the given
39 * vector
41 * This function assumes a right-handed cartesian coordinate system; positive
42 * X is right, positive Y is up.
44 * Ties are resolved in the clockwise direction.
46 * \param x The x component of the vector
47 * \param y The y component of the vector
49 * \return The closest intercardinal direction, or
50 * INTERCARDINAL_DIRECTION::NONE if x and y are both 0
52 static INTERCARDINAL_DIRECTION VectorToIntercardinalDirection(float x, float y);
54 } // namespace INPUT
55 } // namespace KODI