From: matz@... (Yukihiro Matsumoto) Date: 2001-03-10T14:41:35+09:00 Subject: [ruby-talk:12372] Re: Math package Hi, In message "[ruby-talk:12339] Re: Math package" on 01/03/10, GOTO Kentaro writes: |Matz, how about this specification for the built-in functions taking |just one parameter: No. It won't help functions with two or more parameters. I like the idea that enables sin(numarray) etc. Perhaps something like the following will do. module Math def sin(obj) if obj is known object ... calculate sine ... else obj.type.sin(obj) end end end |By the way, I think Math function should be also defined in Math::Libm. I don't get the point. Math is too broad word for the libm functions? matz.