Questions tagged [angle]

A shape, formed by two lines or rays diverging from a common point (the vertex).

Angle is also used to designate the measure of an angle or of a rotation. This measure is the ratio of the length of a circular arc by its radius. In the case of an angle (figure), the arc is centered at the vertex and delimited by the sides. In the case of a rotation, the arc is centered at the center of the rotation and delimited by any point and its image by the rotation.

Source: mathopenref wikipedia

1421 questions
-1
votes
3 answers

How does this code work?

I found this piece of C++ code on a forum that I can't fully understand. Since I don't have their library that performs matrix/vector math, I need to manually figure it out and replicate the functionality. Calculate Euler rotation angles between 2…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
-1
votes
1 answer

How to get angles from bytes c#

I have a binary file with vertex normals. The value is coded as byte. How do I encode angle from byte and convert the angle to float? Example: binary: 128, 128, 255 obviously in angles it's: 90*, 90*, 180* How do I get a value in float? Values are…
Mr Jox
  • 75
  • 9
-1
votes
4 answers

Convert standard 360-degree to atan2

I need to reverse calculation of standard 360 angle to atan2. It's my standard angle calulation Standard angle = (int) Math.toDegrees(Math.atan2(y,x)); if(angle < 0) angle += 360; I need Math.atan2 value from angle how to achieve that.
sabish
  • 31
  • 1
  • 8
-1
votes
2 answers

How to calculate the signed angle between 2 vectors with a given axis normal in 3D?

Suppose if I have two vectors, A and B, and an axis (normalized vector), how do I find the angle between A and B such that the angle difference between A after rotation(axis, angle) and B wrt to the given axis is 0. A doesnt have to be equal to B…
user80667
  • 64
  • 6
-1
votes
1 answer

What unit does Swift use for angles?

Am am writing some code to draw circular charts, and while reading some example code, became confused about how angles are measured in Swift. In the first post I read, Swift seems to use radians: CGContextAddArc(context, origo.x, origo.y, radius,…
user31415
  • 446
  • 7
  • 16
-1
votes
1 answer

Calculating the angle and converting it to degrees

I am having trouble getting an accurate angle measurement and converting it to degrees. I first calculated the distance with: double distance = Math.Sqrt(deltax + deltay); Console.WriteLine("Distance :" + Math.Round(distance,…
-1
votes
1 answer

Calculating Cos inverse to find angle degree

So, right now I am trying to calculate the angles of a right triangle using the inverse of Cosine. However, I don't really know how to do it. I know the equation, just not how to convert into code. The equation would be:: Cos-1(A/C); However, that…
B Whitehead
  • 49
  • 2
  • 8
-1
votes
1 answer

Slanted Div Hover Troubles

I've created a Slanted Div, however I ran into problem I cannot solve, I've googled this but did not find any answers. body { background: black; } #slantedwrapper { overflow: hidden; margin-left: 50px; } #slanted { display:…
kenwin
  • 3
  • 5
-1
votes
1 answer

Python (Length input to draw star with a center point of 0,0)

I have some code were the users input the length they want their star to be and then it draws out the star. What I am trying to accomplish here, is that every-time they make their input not only that it draws the star but it also keeps it centered…
-1
votes
1 answer

How do I generate a `x,y` co-ordinates that is always 90 degrees either left or to the right of the current position of a UIImage?

How do I generate a x,y co-ordinates that is always 90 degrees either left or to the right of the current position of a UIImage? I have a location which is a random x, y in generateRandomLocation. I require to generate a new x,y which is 90 degrees…
Atilla Jax
  • 615
  • 5
  • 15
-1
votes
1 answer

How to get angle based on trigonometric function in C++

I know I can get given angle's trigonometric functions by math.h. I was wondering, if it can be done in reversed direction. Let's say there's a vector with two coordinates. I have its x and y values, so tangent can be easily calculated float…
Maciej Dziuban
  • 474
  • 3
  • 21
-1
votes
1 answer

How i calculate the ball angle after hitting the bat?

I am developing an app for cricket gaming. User can bat through gestures. But did not know which algorithm i can use to calculate ball angle after hitting the bat. Like when user play shot on off side, which cricketing area it will select for ball…
-1
votes
3 answers

calculate angle from vector to coord

I am breaking my head trying to find an appropriate formula to calculate a what sounds to be an easy task but in practice is a big mathematical headache. I want to find out the offset it needs to turn my vector's angle (X, Y, Angle) to face a coord…
Stavm
  • 7,833
  • 5
  • 44
  • 68
-1
votes
2 answers

convert string degrees into decimal units

Given a string "3°5'2''" I need to convert it to a decimal representation.
-1
votes
2 answers

Java game programming - angles

I am trying to learn game programming and about angles. I'm trying to make a game in which you kick a ball, and when it hits a wall it should bounce away from the wall at a certain angle, depending on the speed of the ball when it hits. After trying…
dHoja
  • 206
  • 3
  • 10