Quote:
Originally Posted by rnd me
just curious, what is this for?
It seems to be applying itself.
unrelated, arguments is not an array, and .apply wants arrays as a second arg, even if some browsers let it slip though...
|
sorry my english is some bad.
arguments carry of array feautires. [params],length and be plus methods
if you any Array command aplly to arguments,arguments transform real array as array.property.slice(arguments,0)--> this return only real array party of arguments =[params], but not neccesary aplly method aplly agree robust arguments , not out any problem .
x.toPrecision=function (){return Number.prototype.toPrecision.apply(x,arguments);}??
i assign x to y with y=Angle(30); (this will be y= return value of Angle=x )
but there is little problem
y.degree(90);
x.degree = function(v) {if(v!=null){x=v;mod=0;}//x transform Number 90
normal time y reference to x and y may be transform Number 90,but y not Transform 90 Number ,remain Object (30)
if i use alert(y); //output return 30, not 90 that is related with toString function that for i redefine toString and other functions
(toPrecision acces to Number.valueOf function for get value of Number)
if i not redefine toPrecision function y.precesion aplly for 30(y) ,not for 90(x)