build: Small ImPlot3D fixes to make it build on all platforms
This commit is contained in:
parent
9ca40d3651
commit
0f53656952
@ -51,6 +51,8 @@
|
||||
#include "implot3d.h"
|
||||
#include "implot3d_internal.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -291,7 +291,7 @@ void DemoSurfacePlots() {
|
||||
int idx = i * N + j;
|
||||
xs[idx] = range_min + j * step; // X values are constant along rows
|
||||
ys[idx] = range_min + i * step; // Y values are constant along columns
|
||||
zs[idx] = sinf(std::sqrt(xs[idx] * xs[idx] + ys[idx] * ys[idx])); // Z = sin(sqrt(X^2 + Y^2))
|
||||
zs[idx] = sinf(sqrt(xs[idx] * xs[idx] + ys[idx] * ys[idx])); // Z = sin(sqrt(X^2 + Y^2))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,6 +702,9 @@ template <class _Getter>
|
||||
struct RendererSurfaceFill : RendererBase {
|
||||
RendererSurfaceFill(const _Getter& getter, int x_count, int y_count, ImU32 col) : RendererBase((x_count - 1) * (y_count - 1), 6, 4),
|
||||
Getter(getter),
|
||||
UV({}),
|
||||
Min(0.0f),
|
||||
Max(0.0f),
|
||||
XCount(x_count),
|
||||
YCount(y_count),
|
||||
Col(col) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user