/*
 * Copyright 2015 - 2025 gary@drinkingtea.net
 *
 * 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

#include "point.hpp"
#include "size.hpp"
#include "vec.hpp"

namespace ox {

constexpr Point::Point(Vec2 const&pt) noexcept:
	x(static_cast<int32_t>(pt.x)),
	y(static_cast<int32_t>(pt.y)) {}

constexpr Size::Size(Vec2 const&pt) noexcept:
	width(static_cast<int32_t>(pt.x)),
	height(static_cast<int32_t>(pt.y)) {}

constexpr Vec2::Vec2(Point const&pt) noexcept:
		x(static_cast<float>(pt.x)),
		y(static_cast<float>(pt.y)) {}

constexpr Vec2::Vec2(Size const&pt) noexcept:
	x(static_cast<float>(pt.width)),
	y(static_cast<float>(pt.height)) {}

}