Publish curated LumaOps source from c85ee9ef8f1454f5c305398902afbb9e6738de40
Managed validation / full (push) Failing after 8s

This commit is contained in:
Public Source Publisher committed 2026-09-30 00:26:45 +00:00
1 parent 91f8b3e3c1
commit def7920856
2271 files changed
+501225 -501178

No files matched your search

+23 -23
View File
@@ -1,24 +1,24 @@
/*---------------------------------------------------------*\
| MathUtils.cpp |
| |
| Math utility functions |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <math.h>
#include "MathUtils.h"
int MathUtils::IntInterpolate(int y0, int y1, int x0, int x1, int x)
{
if(x1 == x0)
return y0;
if(y0 == y1)
return y0;
double t = (double)(x - x0) / (double)(x1 - x0);
double y = y0 * (1.0 - t) + y1 * t;
return (int)round(y);
/*---------------------------------------------------------*\
| MathUtils.cpp |
| |
| Math utility functions |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <math.h>
#include "MathUtils.h"
int MathUtils::IntInterpolate(int y0, int y1, int x0, int x1, int x)
{
if(x1 == x0)
return y0;
if(y0 == y1)
return y0;
double t = (double)(x - x0) / (double)(x1 - x0);
double y = y0 * (1.0 - t) + y1 * t;
return (int)round(y);
}