mirror of
https://github.com/Ladebeze66/cpp-partie-2.git
synced 2025-12-16 14:07:54 +01:00
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* whatever.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/03/02 18:56:24 by fgras-ca #+# #+# */
|
|
/* Updated: 2024/03/02 19:05:10 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef WHATEVER_HPP
|
|
#define WHATEVER_HPP
|
|
|
|
#define RESET "\033[0m"
|
|
#define BLACK "\033[30m"
|
|
#define RED "\033[31m"
|
|
#define GREEN "\033[32m"
|
|
#define YELLOW "\033[33m"
|
|
#define BLUE "\033[34m"
|
|
#define MAGENTA "\033[35m"
|
|
#define CYAN "\033[36m"
|
|
#define WHITE "\033[37m"
|
|
|
|
template<typename T>
|
|
void swap(T& a, T& b)
|
|
{
|
|
T temp = a;
|
|
a = b;
|
|
b = temp;
|
|
}
|
|
|
|
template<typename T>
|
|
T const &min(T const &a, T const &b)
|
|
{
|
|
return (a < b) ? a : b;
|
|
}
|
|
|
|
template<typename T>
|
|
T const &max(T const &a, T const &b)
|
|
{
|
|
return (a > b) ? a : b;
|
|
}
|
|
|
|
#endif |