43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* whatever.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/03/23 14:10:38 by aortigos #+# #+# */
|
|
/* Updated: 2026/03/23 14:48:46 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef WHATEVER_HPP
|
|
|
|
# define WHATEVER_HPP
|
|
|
|
# include <iostream>
|
|
|
|
template <typename T>
|
|
void swap(T &x, T &y)
|
|
{
|
|
T tmp = x;
|
|
|
|
x = y;
|
|
y = tmp;
|
|
}
|
|
|
|
template <typename T>
|
|
T min(T const &x, T const &y)
|
|
{
|
|
if (x < y)
|
|
return (x);
|
|
return (y);
|
|
}
|
|
|
|
template <typename T>
|
|
T max(T const &x, T const &y)
|
|
{
|
|
if (x > y)
|
|
return (x);
|
|
return (y);
|
|
}
|
|
#endif |