From: Hal Fulton Date: 2003-12-19T09:25:49+09:00 Subject: Re: How to return more than one result from a method? Tim Hunter wrote: > On Fri, 19 Dec 2003 09:12:20 +0900, Chad Fowler wrote: > >>What does the Float represent? Perhaps there is a relationship between >>the two that would make a new type of class communicate better. My >>thought is (generally) that if you can't tie the two return values >>together in some kind of meaningful way, you may be doing more than one >>job in the method and you could split the method in two. That's just a >>heuristic of course. Can you explain what the method does a little more? >> > > > The method compares two Images and returns a "difference" image (a new > Image that graphically highlights the differences between the two input > images). The Float is a "distortion" statistic - a measure of the amount > of difference between the two. Here are some ways to do it. - an array might be easiest - a Struct might be an option -- it's a little lighter weight than a class - you could add the distortion as a singleton method on the new image Hal