A unit of measurement for angles, which are two lines or rays diverging from a common point. Questions here regard angles measurements, arguments for trigonometric functions, geometry, etc.
Questions tagged [degrees]
264 questions
4
votes
1 answer
How does Boost.Units come up with this imprecise result of conversion?
Consider the following code:
#include
#include
#include
#include
#include
#include
int main()
{
using namespace…

Ruslan
- 18,162
- 8
- 67
- 136
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
4
votes
2 answers
How to draw edges at an angle in graphviz?
I am looking for a way to draw where i can specify angle at which edge is drawn from the node using graphviz tool.
Example is shown in picture below.
Here i have taken the line going to north as 0 Degrees.
So i need something like
1--2…

Aman
- 916
- 11
- 16
3
votes
1 answer
Rotating an object between -45 and 45 degrees not behaving as expected
I'm trying to have an object oscillate between -45 and 45 degrees, and the following is the code I am using. Note that direction is initialized to 1, zRotation to 360, and speed to 100. This works perfectly fine. However, when I change speed to…

Majd Odeh
- 181
- 1
- 11
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
"sna" or "igraph" : Why do I get different degree values for undirected graph?
I am doing some basic network analysis using networks from the R package "networkdata". To this end, I use the package "igraph" as well as "sna". However, I realised that the results of descriptive network statistics vary depending on the package I…

Edda
- 33
- 2
3
votes
2 answers
calculate angle between 2 vectors return value in degrees between 0 and 360
Hey I have the following code that calculates the angle in degrees:
var angleDeg = Math.atan2(mouse.y - base.y, mouse.x - base.x) * 180 / Math.PI;
console.log(angleDeg);
but at the moment i get the angle between 0 and 180 degrees positive and…

FutureCake
- 2,614
- 3
- 27
- 70
3
votes
1 answer
Finding MST such that a specific vertex has a minimum degree
Given undirected, connected graph G={V,E}, a vertex in V(G), label him v, and a weight function f:E->R+(Positive real numbers), I need to find a MST such that v's degree is minimal. I've already noticed that if all the edges has unique weight, the…

sel
- 483
- 5
- 16
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 -…

Jaskaran Singh
- 35
- 6
3
votes
3 answers
CLLocationManager and degrees of heading in iPhone
Using the CLLocationManager object's didUpdateHeading event, how do I convert the resulting heading.x and heading.y values into degrees I can plot onto an image of a compass?

Ian Vink
- 66,960
- 104
- 341
- 555
3
votes
2 answers
Libgdx degree between two points calculation
Here I am calculating degree between actor and touch point and passing this degree to actor as rotation angle.I want the actor should point towards the finger touch or finger dragging direction.(consider i am pulling bus on road by finger touch and…

Parmeshwar C
- 979
- 1
- 12
- 22
3
votes
1 answer
Can Google Maps plot points based on Hours Minutes Seconds
I'm trying to plot out GPS data that is given to me in Hour Minute Second degree format. Will GLatLng take it in this form or do I need to convert it first. Having a hard time finding anything on the internet about this. If it can take it in this…

Serhiy
- 2,505
- 3
- 33
- 49
3
votes
3 answers
How to convert slope to degrees and vice versa?
I'm making a game where you have a sprite that shoots bullets in the direction of the mouse. So far, it works fine with 1 bullet. I have this method that gets a slope, and then normalizes the vector:
public static Vector2f…

user2029675
- 245
- 3
- 9