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).

169 questions
4
votes
2 answers

Radians to degrees Matlab

I want to convert angles from radians to degress. I know that Matlab 2014 has a build-in function to do that, but that function is not good enough in my specific case. Basically, the angle pi/2 is 90deg and -pi/2 is also 90deg, however I need 270deg…
user5489
  • 123
  • 2
  • 8
4
votes
2 answers

GLM: function taking degrees as a parameter is deprecated (WHEN USING RADIANS)

Currently using VC++ 11 with SDL2, GLM, and GLEW. The issue is stemming from GLM when I attempt to do two things: Create a rotation matrix, create a perspective camera matrix (3D). The error is: "GLM: perspective function taking degrees as a…
HarrisonG16
  • 853
  • 1
  • 6
  • 15
3
votes
2 answers

How do I convert degrees to radians?

I have the following function to convert from radians to degrees: float DegreesToRadians(float degrees) { return degrees * (PI / 180); } When I now do: sinf(DegreesToRadians(90)); This returns 1, as expected. But when I…
Ams1901
  • 69
  • 1
  • 1
  • 6
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,536
  • 31
  • 133
  • 232
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 …
egg
  • 115
  • 1
  • 9
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,139
  • 10
  • 41
  • 79
2
votes
3 answers

Why doesn't mean square error work in case of angular data?

Suppose, the following is a dataset for solving a regression problem: H -9.118 5.488 5.166 4.852 5.164 4.943 8.103 -9.152 7.470 6.452 6.069 6.197 6.434 8.264 9.047 2.222 H 5.488 5.166 4.852 5.164 4.943 …
user366312
  • 16,949
  • 65
  • 235
  • 452
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
  • 945
  • 3
  • 9
  • 18
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
  • 1,174
  • 3
  • 25
  • 50
2
votes
2 answers

JS | How to lerp rotation in radians?

function lerp(start, end, amt) { return (1-amt)*start+amt*end } This lerp function works perfectly with coords. I can easily lerp X from 1 to 10. But problems appear when it comes to rotation. The rotation of an object is in radians. It can be…
AnimateMe
  • 57
  • 7
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
  • 16,546
  • 57
  • 163
  • 275
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
  • 5,732
  • 4
  • 37
  • 65
1
2
3
11 12