Regions.java

00001 package edu.stanford.hci.r3.tools.design.util;
00002 
00013 public class Regions {
00014 
00024         public static double makeItFit(double width, double height, 
00025                         double maxWidth, double maxHeight) {
00026                 double xprop, yprop;
00027                 if ((xprop = width / maxWidth) < (yprop = height / maxHeight))
00028                         return 1/yprop;
00029                 return 1/xprop;
00030         }
00031 
00032 }

Generated on Sat Apr 14 18:21:38 2007 for R3 Paper Toolkit by  doxygen 1.4.7