From 431903301170bffaea3a481813a210dc407d0455 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Thu, 12 May 2005 18:59:09 +0000 Subject: [PATCH] r10534: remote warnings, add units capability to make-output-format --- cameras.lisp | 10 ++++++++-- fov.lisp | 2 +- tables.lisp | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cameras.lisp b/cameras.lisp index 57ef380..7eb8b67 100644 --- a/cameras.lisp +++ b/cameras.lisp @@ -27,9 +27,15 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (defun make-output-format (w h &key (units :inches)) - (let ((name (format nil "~Dx~Din" w h))) + (let ((name (format nil "~Dx~D~A" w h + (ecase units + (:inches "in") + (:mm "mm") + (:cm "cm") + (:m "m") + (:feet "ft"))))) (list :format (kmrcl:ensure-keyword name) - :output (cons (inches->mm w) (inches->mm h)) + :output (cons (length->mm w units) (length->mm h units)) :name name :nicks (list (kmrcl:ensure-keyword (format nil "~Dx~D" w h))))))) diff --git a/fov.lisp b/fov.lisp index fba5ce9..80c8f5b 100644 --- a/fov.lisp +++ b/fov.lisp @@ -159,7 +159,7 @@ focal-length and image-distance are in mm, object-distance is in units" (t (error "Must set two, and only two, of the parameters: image-distance, object-distance, and focal-length.")))) -(defun close-up (&key focal-length object-distance image-distance magnification (units :feet) &aux bellows-factor) +(defun close-up (&key focal-length object-distance image-distance magnification (units :feet)) "Computes the parameters for focusing closer than infinity. Requires two, and only two, of the input parameters. Returns: focal-length object-distance image-distance magnification bellows-factor." diff --git a/tables.lisp b/tables.lisp index 0b256a5..228a0ed 100644 --- a/tables.lisp +++ b/tables.lisp @@ -71,6 +71,7 @@ (dolist (distance distances) (multiple-value-bind (near far dof mag blur) (dof focal-length f-stop distance coc :units units) + (declare (ignorable dof mag blur)) (when (minusp far) (setq far "Inf ")) (format output "~5F/~5F " near far))) (format output "~%"))) -- 2.34.1