Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to get accurate float PI constant?

$
0
0

@cuinjune wrote:

Hi, I'm trying to use PI as float.

I wonder if it is safe to just cast PI to float constant like below.

static_cast< float >(PI)

If I print the value, it prints 3.14159

Would this be accurate enough to use PI as float or should I create another float constant?

Thank you!

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles