[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / utils / Vector.h
blobf427ec934ce2a05ddac4446197e0f65e721650d5
1 /*
2 * Copyright (C) 2012-2018 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 class CVector
13 public:
14 CVector() = default;
15 constexpr CVector(float xCoord, float yCoord):x(xCoord), y(yCoord) {}
17 constexpr CVector operator+(const CVector &other) const
19 return CVector(x + other.x, y + other.y);
22 constexpr CVector operator-(const CVector &other) const
24 return CVector(x - other.x, y - other.y);
27 CVector& operator+=(const CVector &other);
28 CVector& operator-=(const CVector &other);
30 constexpr float scalar(const CVector &other) const
32 return x * other.x + y * other.y;
35 float length() const;
37 float x = 0;
38 float y = 0;