ZScript π

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ZScript π

Re: ZScript π

by m8f » Sat Feb 13, 2021 12:52 pm

Re: ZScript π

by kevansevans » Mon Jan 25, 2021 11:02 pm

Graf Zahl wrote:const pi = 3.1415926535897932384626433832795;
Wouldn't this open up potential conflict of multiple mods using their own definition of pi? I'd be really annoyed if my mods didn't work because I didn't use the same magic number as a different mod I was trying to replicate.

Most languages have this built into their standard math lib anyways, no harm adding it to ZScript.

Re: ZScript π

by 3saster » Fri Jan 22, 2021 6:30 am

I think in addition to properly exposing Pi natively in ZScript, it would be good to somehow expose/implement radian argument trigonometric functions as well.

Re: ZScript π

by Graf Zahl » Fri Jan 22, 2021 1:41 am

const pi = 3.1415926535897932384626433832795;

Re: ZScript π

by wildweasel » Fri Jan 22, 2021 1:31 am

You could, perhaps, define it as a constant whose value is the result of 22/7.

ZScript π

by Arctangent » Fri Jan 22, 2021 1:23 am

there is something deeply distressing about the fact that zscript would flunk out of high school due to being unable to calculate the circumference of a circle

Top