Rad2Deg // Deg2Rad

Started by Sorrontis, June 05, 2016, 02:42:13 PM

Previous topic - Next topic

Sorrontis

I've followed the guide, but the compiler does not recognize it. Any hints?
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

Grayzzur

Sample code on how you're trying to use it? Which version of CW3?
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker

Sorrontis

Quote from: Grayzzur on June 05, 2016, 03:11:35 PM
Sample code on how you're trying to use it? Which version of CW3?

Version 2.12

Code I was using was either:

<-Radians Rad2Deg mul ->Degrees

or

<-Radians Rad2Deg ->Degrees

The compiler just sees Rad2Deg as a variable and asking for <- or -> or @ (the usual error)
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

Grayzzur

Looks like those constants were added to the wiki in March 2015. I think CRPL was pretty much finalized long before then, and I don't see those keywords in the Notepad++ syntax docs either.

You could always multiply by PI and divide by 180 (or vice versa). :)
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker

Sorrontis

Quote from: Grayzzur on June 05, 2016, 03:40:11 PM
Looks like those constants were added to the wiki in March 2015. I think CRPL was pretty much finalized long before then, and I don't see those keywords in the Notepad++ syntax docs either.

You could always multiply by PI and divide by 180 (or vice versa). :)

That's what I ended up doing. It was only for my trace anyways, I work better in degrees (engineer vs mathematician) :D
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

knucracker

Hmmm... I would have sworn they were there in CRPL.... but that's memory for you.  I looked and they are definitely not there. 
I added them to PRPL a while back, though.

These are some additional constants there in PRPL for particle fleet:
TAU, TWOPI, HALFPI, QUARTERPI, RAD2DEG, DEG2RAD

( http://www.scientificamerican.com/article/let-s-use-tau-it-s-easier-than-pi/ )

Sorrontis

What's PRPL? Now I'm confused  :o
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

Builder17

PRPL = CRPL in particle fleet , or game 4.

Sorrontis

"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

Particle Reverse Polish Language. Search it, it's got a topic already, and a long discussion.
A narrative is a lightly-marked path to another reality.