From 12db7a5093ae4a3d9aaa57c53e25aef924eefb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 19 May 2020 10:58:34 +0200 Subject: [PATCH] [apps/shared] Change default shape of arrow in CurveView (to match matplotlib shape) --- apps/shared/curve_view.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/shared/curve_view.h b/apps/shared/curve_view.h index ae23f1818..4f8da4eff 100644 --- a/apps/shared/curve_view.h +++ b/apps/shared/curve_view.h @@ -96,9 +96,10 @@ protected: * <--- L ---> * * l = arrowWith - * tanAngle = tan(angle) = l/L + * tanAngle = tan(angle) = l/2L */ - void drawArrow(KDContext * ctx, KDRect rect, float x, float y, float dx, float dy, KDColor color, float arrowWith = 4, float tanAngle = 0.4f) const; // 0.3639 = tan(20°) + + void drawArrow(KDContext * ctx, KDRect rect, float x, float y, float dx, float dy, KDColor color, float arrowWith = 4, float tanAngle = 1.0f/3.0f) const; void drawGrid(KDContext * ctx, KDRect rect) const; void drawAxes(KDContext * ctx, KDRect rect) const; void drawAxis(KDContext * ctx, KDRect rect, Axis axis) const;