;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10; Package: photo -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: convert.lisp ;;;; Purpose: Conversions functions for cl-photo ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: April 2005 ;;;; ;;;; $Id: package.lisp 8596 2004-02-03 18:32:50Z kevin $ ;;;; ;;;; This file, part of cl-photo, is Copyright (c) 2005 by Kevin Rosenberg. ;;;; Rights of modification and redistribution are in the LICENSE file. ;;;; ;;;; ************************************************************************* (in-package #:photo) (defconstant +radian->degrees+ (/ 360d0 pi 2)) (defconstant +inches->mm+ 25.4) (defun diagonal (x y) (sqrt (+ (* x x) (* y y)))) (defun radians->degrees (r) (* +radian->degrees+ r)) (defun mm->feet (d) (/ d +inches->mm+ 12)) (defun feet->mm (d) (* d 12 +inches->mm+))