Questions tagged [radians]

Questions regarding angular sizes, arguments for trigonometric functions geometry etc.

Radian is a unit of angular measure. It is measured as the ratio between the length of the corresponding arc and its radius. It is often used as an argument to trigonometric function (e.g., sin, cosine etc.). It is also used as an angular measure for frquency analysis of signals (e.g., in Fourier space).

144 questions
4
votes
2 answers

How to convert a degrees calculation to radians? (Kawa to Java)

I have tried to convert a calculation from an app I made using MIT AppInventor which uses Kawa to Android using Java.The problem I'm facing is that the trigonometric parts of the calculation in Kawa are using degress.My question is how do I…
Brian J
  • 5,416
  • 19
  • 94
  • 189
3
votes
1 answer

What kind of rotation unit is used by this game?

I am observing a rotation value of a character in a game, and its value confuses me. I am wondering, what kind of unit is used here? It does not seem to be radian or degrees. When the character faces... north, rotation = 0.014887573 north-east,…
Tom
  • 8,437
  • 26
  • 122
  • 217
3
votes
1 answer

cos result incorrect

I import "math.h". I can use the cos function, but when I execute cos(0.321139585333178) the result is 0.948876 If I use the calculator in Mac or use a normal calculator, the result is 0.999984292347418 Can anyone help me to solve that problem?
suk
  • 31
  • 2
3
votes
1 answer

Can't find the angle object is moving in radians

I have been making a mod for a game called Minecraft PE and I'm using it to learn. Before I show my code I want you to know that Y is the vertical axis and X and Z is horizontal. Here is some code I used: Math.asin(Math.sin((fPosXBeforeMoved -…
3
votes
1 answer

2d Ray Tracing - filling the view

My 2d ray tracer has worked fine up until the point where I sorted the calculated rays by angle (radian to be specific). I assume it has to do with the way tan is acting but I am not sure. What is the best way to sort the angles with a known x,y …
egdenis
  • 115
  • 1
  • 7
2
votes
4 answers

SQL query works on phpMyAdmin but not Codeigniter

I have this SQL Query : SELECT *, ( 3959 * acos( cos( radians(41.832100) ) * cos( radians( latitude ) ) * cos( radians( longitude) - radians(-87.789597) ) + sin( radians(41.832100) ) * sin( radians( latitude ) ) ) ) AS distance FROM cities_extended…
2
votes
1 answer

SQL error for great circle calculation

I was searching stackoverflow and got an answer to my question, but when I tried to implement it with my code I got weird errors. here is the code: SELECT `zip_code`, (6371 * acos(cos(radians($latitude)) * cos(radians(`lat`)) * cos(radians(`long`) -…
Grigor
  • 4,009
  • 9
  • 38
  • 74
2
votes
1 answer

Actionscript3.0 - Why the value of Math.cos(35.26) is Minus?

trace(Math.cos(45)); //0.5253219888177297 trace(Math.cos(30)); //0.15425144988758405 trace(Math.cos(35.264)); //-0.7606511017750149 I'm confused. Do I need to lean Math at the Middle School?
webnoon
  • 825
  • 2
  • 9
  • 17
2
votes
1 answer

How to convert string to radians in pandas to calculate distance between two points

I have a dataframe df: {'city': {0: 'Adak', 1: 'Akiachak', 2: 'Akiak', 3: 'Akutan', 4: 'Alakanuk'}, 'latitudedegrees': {0: '51.87957', 1: '60.88981', 2: '60.911865', 3: '54.098693', 4: '62.683391'}, 'latituderadians': {0:…
user3486773
  • 958
  • 1
  • 14
  • 38
2
votes
3 answers

Confused about degrees and OpenGL/GLUT camera movement/rotation

NOTICE: I have edited the question below which is more relevant to my real issue than the text right below, you can skip this if you but I'll leave it here for historic reasons. To see if I get this right, a float in C is the same as a value in…
rfgamaral
  • 15,937
  • 49
  • 156
  • 269
2
votes
2 answers

Converting radians to degrees in a reference-circle manner

Context: I'm creating a map-replanner for a robot in C, it should add obstacles within the environment to the map depending on which IR-sensors are getting high readings. For this i need to check how the robot is positioned IRL vs in the internal…
Joel
  • 3,791
  • 1
  • 25
  • 41
2
votes
1 answer

ggplot coord_polar() plotting between pi/2 and -pi/2 at top and bottom

I have a set of values that range between pi/2 and -pi/2. I'd like to plot them using the histogram geom and polar plot, so at the top of the polar there is pi/2 and at the bottom, there is -pi/2. The datafile I'm using:…
H Ludwig
  • 83
  • 7
2
votes
1 answer

Calculating SD of compass directions using Circular

My goal is to calculate a mean and standard deviation for a series of compass degrees. Since I may cross the 360/ 0 mark, I can't use the a standard mean or sd calculation. I've been using the circular packing in R, which seems to give me the…
Vinterwoo
  • 3,643
  • 6
  • 30
  • 51
2
votes
2 answers

degtorad vs deg2rad in MATLAB?

Is there a difference between degtorad and deg2rad in MATLAB? Is there a benefit of one over the other, like speed (or some other metric I didn't think…
ErinGoBragh
  • 326
  • 3
  • 20
2
votes
1 answer

Change axis in polar plots in matlab to radians

So matlab rightfully uses radians for trigonometric functions and in the actual plotting of polar plots. However annoyingly it puts the angular axis in degrees, is there any way to change this?
Nick Bell
  • 23
  • 1
  • 3
1
2
3
9 10