trigonometry


Arctan > 1 newbie question


It has been quite some time since I've had to compute the theta of an angle. But given a right angle:
|
|
b |
-----------------
a
I'm trying to compute theta (the slope of the angle). My understanding of trigonometry (as rusty as it is) is that theta = arctan(b/a). So if b = 50 and a = 1811. Then using the windows calculator, 50 / 1811 = 0.027609055770292655991165102153506. Therefore the arctan(b/a) = 1.5814806205083755492980816356377. If my math is correct, how do I translate this value into the slope of the angle? It should be around 30-40 degrees, right?
atan2(y, x)
will return you the angle in radians (and successfully cope with the cases where x and/or y are 0).
To convert to degrees apply the following formula:
double degrees = radians * (180 / PI)
Where PI is 3.141592... or math.pi in c#
If you use a C dialect then there a useful function for just this purpose
atan2(y, x);

Related Links

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
SWIFT trig functions
Simplifying atan(tan(a+b))
2 Different Radians constant calcuations whats the difference?

Categories

HOME
algorithm
cygwin
grok
jpa
deep-learning
awk
cheerio
wakanda
twig
character-encoding
toolbox
pclxl
replace
spring-data-mongodb
permissions
frontend
boto3
flume
automatic-ref-counting
event-sourcing
symfony-2.8
soci
shortest-path
guzzle
blade
babel
string-concatenation
jquery-callback
dynamically-generated
gmock
asymptotic-complexity
uitapgesturerecognizer
testcomplete
constexpr
record
left-join
playstation-portable
card.io
openwhisk
html-encode
imx6
openproject
google-knowledge-graph
wurfl
node-mssql
password-protection
jvmti
wmp
snapchat
double-click
fwrite
dotnet-httpclient
wcftestclient
dtsearch
offline.js
google-photos
filenet
branch-prediction
slackware
reporting-services-2012
xcode-server
google-cloud-console
jtwig
angular-ui-typeahead
np-spring
httpruntime.cache
state-restoration
iokit
morton-number
coda
evolus-pencil
mod-proxy
dulwich
haskell-warp
baasbox
teamcity-9.1
openbabel
paw
xml-namespaces
matrix-inverse
dot42
authlogic
vbe
cfcache
clickbank
drupal-nodes
gd-graph
sphinxql
oocss
script#
tlf
epiceditor
font-awesome-4.0.0
video-codecs
panda3d
mkv
garbage
ilasm
stress
flex-mobile
procedures
entitydatasource
globals
hbm2java
folding
information-management
lemmatization

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