As a simple script:

// script begin
mypi = Math.PI;
Self.SetTotalTranslate(new r3Vect(mypi*Time,2.2, 0));
// script end

// ok, more correct is
var mypi = Math.PI;
Self.SetTotalTranslate(new r3Vect(mypi*Time,2.2, 0));
// script end

or directly:

// script begin
Self.SetTotalTranslate(new r3Vect(Math.PI*Time,2.2, 0));
// script end

think of "Math.PI" as a "alternate" for
3,141592653589793238462643383...

Matthias

----- Original Message ----- 
From: "Zaug" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, December 29, 2007 2:44 PM
Subject: Re: Javascript, one more math function


> Alasdair wrote:
> > thats very helpful, rs3d community to the rescue again :)
> > many thanks
> > Alasdair
> >
> > ----- Original Message ----- From: "Matthias Kappenberg" 
> > <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Wednesday, December 26, 2007 9:23 AM
> > Subject: Re: Javascript
> >
> >
> >> Copied from http://www.javascripter.net/faq/mathfunc.htm
> >>
> >> Math.abs(a) // the absolute value of a
> >> Math.acos(a) // arc cosine of a
> >> Math.asin(a) // arc sine of a
> >> Math.atan(a) // arc tangent of a
> >> Math.atan2(a,b) // arc tangent of a/b
> >> Math.ceil(a) // integer closest to a and not less than a
> >> Math.cos(a) // cosine of a
> >> Math.exp(a) // exponent of a
> >> Math.floor(a) // integer closest to and not greater than a
> >> Math.log(a) // log of a base e
> >> Math.max(a,b) // the maximum of a and b
> >> Math.min(a,b) // the minimum of a and b
> >> Math.pow(a,b) // a to the power b
> >> Math.random() // pseudorandom number in the range 0 to 1
> >> Math.round(a) // integer closest to a
> >> Math.sin(a) // sine of a
> >> Math.sqrt(a) // square root of a
> >> Math.tan(a) // tangent of a
> >>
> There is also:
> Math.PI // ?
> 
> Cheerz,
> Zaug
> 

Reply via email to