Files
cpp07/ex00/whatever.hpp
aortigos 582f5ad276 Fixes
2026-03-23 09:56:09 +01:00

44 lines
1.2 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* whatever.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/21 15:44:59 by aortigos #+# #+# */
/* Updated: 2026/03/21 15:48:28 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SWAP_HPP
# define SWAP_HPP
# include <iostream>
template <typename T>
void swap(T &a, T &b)
{
T tmp = a;
a = b;
b = tmp;
}
template <typename T>
T min(T const &a, T const &b)
{
if (a < b)
return (a);
return (b);
}
template <typename T>
T max(T const &a, T const &b)
{
if (a > b)
return (a);
return (b);
}
#endif