graphcurses

Curses 2D graph generator
git clone git://git.christosmarg.xyz/graphcurses.git
Log | Files | Refs | README | LICENSE

commit d103ce96615e9230eb28a960836d93ec45e07e95
parent 4d34b6437d52bb2b46f7111a28f7f391de481756
Author: Christos Margiolis <christos@margiolis.net>
Date:   Fri, 10 Apr 2020 15:26:01 +0300

minor changes

Diffstat:
MREADME.md | 1-
Mbin/graphcurses | 0
Mobj/main.o | 0
Mobj/plane.o | 0
Msrc/plane.cpp | 4++++
Msrc/plane.h | 10++++------
6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md @@ -19,4 +19,3 @@ A simple ncurses graph generator. * *(Perhaps)* add derivative calculator * Fix axes plotting bug * Add point numbering on axes -* Fix function disappearing when pressing 'f' diff --git a/bin/graphcurses b/bin/graphcurses Binary files differ. diff --git a/obj/main.o b/obj/main.o Binary files differ. diff --git a/obj/plane.o b/obj/plane.o Binary files differ. diff --git a/src/plane.cpp b/src/plane.cpp @@ -1,5 +1,9 @@ #include "plane.h" +Plane::Plane() + :ymin(YMIN_PLANE), ymax(YMAX_PLANE), xmin(XMIN_PLANE), xmax(XMAX_PLANE), + xscale(XSCALE_PLANE), yscale(YSCALE_PLANE), ymaxs(getmaxy(stdscr)), xmaxs(getmaxx(stdscr)) {} + void Plane::restore_zoom() { xmin = XMIN_PLANE; diff --git a/src/plane.h b/src/plane.h @@ -1,11 +1,11 @@ #ifndef PLANE_H #define PLANE_H -#include <ncurses.h> -#include <iostream> -#include <functional> #include <cmath> +#include <functional> +#include <iostream> #include <matheval.h> +#include <ncurses.h> #define XMIN_PLANE -2.0f*M_PI #define XMAX_PLANE 2.0f*M_PI @@ -23,9 +23,7 @@ class Plane int ymaxs, xmaxs; public: - Plane() - :ymin(YMIN_PLANE), ymax(YMAX_PLANE), xmin(XMIN_PLANE), xmax(XMAX_PLANE), - xscale(XSCALE_PLANE), yscale(YSCALE_PLANE), ymaxs(getmaxy(stdscr)), xmaxs(getmaxx(stdscr)) {} + Plane(); void restore_zoom(); void draw_axes();