summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2016-09-02 07:01:25 -0500
committerDavid McMackins II <contact@mcmackins.org>2016-09-02 07:01:25 -0500
commitb686ce8f91636d5318e98aec6e45866fec88b357 (patch)
treeb55097a476b64e9b2b034b1be9e8846e5dfb32a7
parentaf89f3159841b1a1d972f32a88aca30600ec7e92 (diff)
Add pi character
-rw-r--r--src/keys.c3
-rw-r--r--src/tibvar.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/keys.c b/src/keys.c
index 3a6e388..2d00e6d 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -45,6 +45,9 @@ normalize_keycode (SDL_Keycode code, SDL_Keymod mod)
case SDLK_e:
return TIB_CHAR_EPOW10;
+
+ case SDLK_p:
+ return TIB_CHAR_PI;
}
}
else if (mod & KMOD_SHIFT)
diff --git a/src/tibvar.c b/src/tibvar.c
index 3d26a94..f25061a 100644
--- a/src/tibvar.c
+++ b/src/tibvar.c
@@ -18,6 +18,7 @@
#include <math.h>
#include <stdlib.h>
+#include "tibchar.h"
#include "tiberr.h"
#include "tibvar.h"
@@ -57,6 +58,8 @@ tib_var_init ()
}
ADD ('e', tib_new_complex (2.718281828459045235360287471352662498, 0));
+ ADD (TIB_CHAR_PI,
+ tib_new_complex (3.141592653589793238462643383279502884, 0));
#undef ADD