src/math.lisp @ 2f82e9ecb18e

Episode 11: Gravity
author Steve Losh <steve@stevelosh.com>
date Sun, 10 Apr 2016 23:13:35 +0000
parents 4b895fc69daf
children 5c1a3615e9fc
(in-package #:coding-math)

(defconstant tau (* pi 2))


(defun normalize (n min max)
  (/ (- n min)
     (- max min)))


(defun lerp (from to n)
  (+ from
     (* n (- to from))))