mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-23 22:21:27 +00:00
Use standard library min/max
This commit is contained in:
parent
53fe825e49
commit
c475ee1dec
|
@ -43,10 +43,11 @@
|
||||||
|
|
||||||
#include "TexComp.h"
|
#include "TexComp.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <algorithm>
|
||||||
#include <stdlib.h>
|
#include <cmath>
|
||||||
#include <stdio.h>
|
#include <cstdlib>
|
||||||
#include <assert.h>
|
#include <cstdio>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
#include "BC7Compressor.h"
|
#include "BC7Compressor.h"
|
||||||
#include "Thread.h"
|
#include "Thread.h"
|
||||||
|
@ -57,19 +58,9 @@
|
||||||
#include "Image.h"
|
#include "Image.h"
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static T min(const T &a, const T &b) {
|
|
||||||
return (a < b)? a : b;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static T max(const T &a, const T &b) {
|
|
||||||
return (a > b)? a : b;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static void clamp(T &x, const T &minX, const T &maxX) {
|
static void clamp(T &x, const T &minX, const T &maxX) {
|
||||||
x = max(min(maxX, x), minX);
|
x = std::max(std::min(maxX, x), minX);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in a new issue