trigonometry


2 Different Radians constant calcuations whats the difference?


Most commonly I see in programs that convert radians to degrees and degrees to radians for trigonometry people always use two different ways to get the radian constant.
double PI = 3.14159265358979;
double Radians = (2 * PI) / 360;
Most commonly I see the one shown below:
double Radians = PI / 180;
From my understanding they both seem to generate the same value, but it seems that the one with 360 looks better. After all it's the angle for a full circle and the other one uses the 180 which is half the circle, also I always learned that PI is for calculating distances in circles so multiplying it by 2 makes no sense to me.
Only thing I can understand from this is that it's some kind of scaling going on here to generate same results.
But shouldn't they both give a little difference anyway?
Since PI is a irrational number, meaning the 180 variant should be less precise?
Yeah my math logic are not good sorry about that.
I think it's just preferential. The first way more closely maps to what you might have learned in school algebra ("there are 2*PI radians in a circle") - it makes explicit what the calculation is. The 2nd way is a reduction of the first. On a modern compiler, both should be equally efficient (though I'd use floating point constants instead of ints). Bottom line: no important difference.

Related Links

How does atan appear in haversine formula?
Sympy cancelling terms in the Jacobian of polar coordinates transformation
Distance formula between two Lat/Longs Autoit?
Trigonometric Functions in Pseudo Code
Inverse-Kinematics: How to calculate angles for servos of a robotic arm to reach all possible points in a canvas?
How to calculate Heading using Gyro and magnetometer
Integral of a sign function proof
Best way working with trigonometric functions
Calculate place of point C to be equal distance away from points A and B
How to compute sum of angles from sine and cossine?
Counting trig ops as measure() function to fu() in sympy
Find a coordinate along a path
Angle calculation resulting in strange behavior
Shift angle orientation using atan2
estimate angle between two lines y = 1000x and y = 999x
Need help revising a simple formula to make it universal

Categories

HOME
pagination
gpu
pyqt
static
web-hosting
onclick
settings
jax-ws
retrofit2
webix
discrete-mathematics
syntaxnet
minecraft-forge
enthought
activecollab
emoji
rtf
favicon
cumulocity
mongodb-csharp
gruntfile
scsi
pyramid
enterprise-miner
exploit
qliksense
interpreter
mount
asymptotic-complexity
apktool
soot
sqsh
gitlab-api
angularjs-material
android-maps-extensions
slacktextviewcontroller
openerp-7
claims
knime
monkey-testing
pom.xml
configurationmanager
posixct
podscms
corruption
static-cast
skin
trigger.io
microstation
drawstring
x-tag
tracker-enabled-dbcontext
bizagi
false-sharing
libvlc
oracle-spatial
rdflib
google-refine
broadband
cross-join
at-job
wcm
raygun
paste
decoupling
artemis
http-patch
windows-phone-8-sdk
flex++
css-reset
diem
pclzip
fb.ui
curb
web-farm
saleslogix
failing-tests
cgimage
flex-mobile
w3c-geolocation
codebase
photolibrary
qglwidget
zend-rest
filesystemobject
cldc
scrubyt
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App