Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to get Pi in AGK?

Author
Message
DavidAGK
4
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 9th Aug 2018 20:25
I recall a command that returns pi (π) in AppGameKit but can't find it for the life of me! Searches are confounded by Rapsberry Pi - anyone know the command?
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 9th Aug 2018 20:43
In the Official AppgameKit Tutorial Guide -> #constant PI 3.14159
Maybe there is no extra command for this.
DavidAGK
4
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 9th Aug 2018 21:05
I'm sure I've used a command in the past.... maybe not.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
puzzler2018
1
Years of Service
Recently Online
Joined: 8th Oct 2017
Location:
Posted: 10th Aug 2018 13:33 Edited at: 10th Aug 2018 13:34
Ive never seen one either - so yes - that #constant pi is something you just have to put in your app as there is no in built math function for it



or you could go mad for better precision


lol
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 10th Aug 2018 13:57
And now we make a contest -> found the last number of PI
puzzler2018
1
Years of Service
Recently Online
Joined: 8th Oct 2017
Location:
Posted: 10th Aug 2018 14:01
Yeah cool - https://www.piday.org/million/

Too many to put in a code tag


I win!!
Bengismo
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th Aug 2018 14:27 Edited at: 10th Aug 2018 14:31
Using #constant is the correct thing to do

There's no real point in specifying PI past around 7/8 significant places as the digits beyond that cant be represented in a 32bit float variable anyway. They get truncated/rounded.

Uninterestingly, these functions also give PI as well....

PI=ACosRad(0)*2
PI=ASinRad(1)*2
PI=ATanRad(1)*4

All these give 3.141593....via the wonders of trigonometry zzzzzzz
DavidAGK
4
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 13th Aug 2018 20:16
Very good everyone!
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)

Login to post a reply

Server time is: 2018-10-15 22:09:23
Your offset time is: 2018-10-15 22:09:23