From a1ab16834b529177ccb073f4ebc038e4b35b4f19 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Mon, 18 Nov 2024 20:38:48 +0800 Subject: [PATCH] tmp --- example/mathgl_dens_ex.cpp | 4 ++-- example/mathgl_plot_ex.cpp | 2 +- lib/graphic/mathgl_plot.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/mathgl_dens_ex.cpp b/example/mathgl_dens_ex.cpp index e9d135c..e91c5b1 100644 --- a/example/mathgl_dens_ex.cpp +++ b/example/mathgl_dens_ex.cpp @@ -32,8 +32,8 @@ int main(int argc, char const *argv[]) { gctl::array x(NUM), y(NUM), z(NUM*NUM); - gctl::sequence(x, -2.0*GCTL_Pi, 0.04*GCTL_Pi); - gctl::sequence(y, -2.0*GCTL_Pi, 0.04*GCTL_Pi); + x.sequence(-2.0*GCTL_Pi, 0.04*GCTL_Pi); + y.sequence(-2.0*GCTL_Pi, 0.04*GCTL_Pi); for (size_t i = 0; i < NUM; i++) { diff --git a/example/mathgl_plot_ex.cpp b/example/mathgl_plot_ex.cpp index 228b589..0e95e56 100644 --- a/example/mathgl_plot_ex.cpp +++ b/example/mathgl_plot_ex.cpp @@ -33,7 +33,7 @@ int main(int argc, char const *argv[]) { gctl::array x(NUM), y(NUM); - gctl::sequence(x, -2.0*GCTL_Pi, 0.04*GCTL_Pi); + x.sequence(-2.0*GCTL_Pi, 0.04*GCTL_Pi); for (size_t i = 0; i < NUM; i++) { y[i] = sin(x[i]); diff --git a/lib/graphic/mathgl_plot.cpp b/lib/graphic/mathgl_plot.cpp index 994c2d2..749f2a2 100644 --- a/lib/graphic/mathgl_plot.cpp +++ b/lib/graphic/mathgl_plot.cpp @@ -61,7 +61,7 @@ int gctl::mathgl_plot::Draw(mglGraph *gr) x_d.Set(x_.get(), x_.size()); y_d.Set(ys_.get(), ys_.size()); - double mean = gctl::mean(ys_); + double mean = ys_.mean(); double mini = ys_.front(), maxi = ys_.front(); for (size_t i = 1; i < ys_.size(); i++) {