/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

#pragma once

#ifdef _MSC_VER
#undef min
#undef max
#endif

namespace OpenVulkano::Math
{
	template<typename T>
	class Range
	{
	public:
		T min, max;

		Range() = default;

		Range(const T& min, const T& max) : min(min), max(max) {}

		[[nodiscard]] const T& GetMin() const { return min; }

		[[nodiscard]] const T& GetMax() const { return max; }

		[[nodiscard]] T& GetMin() { return min; }

		[[nodiscard]] T& GetMax() { return max; }

		[[nodiscard]] T GetSize() const { return max - min; }
	};
}
