about summary refs log tree commit diff stats
path: root/free-fall.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'free-fall.lsp')
-rw-r--r--free-fall.lsp6
1 files changed, 3 insertions, 3 deletions
diff --git a/free-fall.lsp b/free-fall.lsp
index 27dec85..a7cd918 100644
--- a/free-fall.lsp
+++ b/free-fall.lsp
@@ -1,10 +1,10 @@
 ;; TODO: air resistance, terminal velocity
-(defconstant +G+ 9.81)
+(defconstant +g+ 9.81)
 (defglobal *alt* 20000)
 (defglobal *v* 0)
 (defun step ()
    (setq *alt* (- *alt* *v*))
-   (setq *v* (+ *v* +G+))
+   (setq *v* (+ *v* +g+))
    (format (standard-output) "~A~%" *alt*))
 (defun my-main ()
    (while (> *alt* 0)
@@ -15,5 +15,5 @@
    (format (standard-output) "Gravitational constant: ~A~%" +G+)
    (format (standard-output) "Twice that: ~A~%" (* 2 +G+))
    (let* ((time 10)
-          (distance (* 0.5 +G+ (expt time 2))))
+          (distance (* 0.5 +g+ (expt time 2))))
          (format (standard-output) "Distance travelled in 10 seconds of free fall: ~A~%" distance)))