From: Christoph Date: 2002-04-02T05:10:37+09:00 Subject: Re: Why isn't Math object-oriented? "Hal E. Fulton" wrote in .... > I think I agree. My opinion is that the solution suggested by > Nobu Nokada should be standard; i.e., by default these > should be callable either as > > func(num) > > or as > > num.func > > After all... There's More Than One Way To Do It. This would only work if the Math module functions are implemented in terms of Numeric (or one of its Class underlings) instance methods - other wise, lets say I want to implement a sin() method for quadric matrixes I'll have to redefine the ``global'' Math#sin(arg) method - i.e. class << Math alias old_sin sin def sin(x) unless x.is_a? SquareMatrix old_sin(x) else ... end end end /Christoph