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
1 answer

Rotating point by angle

I know that the theory of rotating a point by an angle is on the internet a million times, but I don't get my code to work properly. I have a line with 2 points, when you click on 1 of the 2 points, you will rotate the point relative to the other…
Erwin Okken
  • 233
  • 2
  • 17
-1
votes
1 answer

Trouble with Direction and Angle Updating in XNA

I have been trying to make a tower defense game game where the mob is given a destination to move towards at a given velocity, and the way it is set up now something quirky is happening with the updateAngle() method that I am not sure about. //…
user2716722
  • 93
  • 11
-1
votes
1 answer

Maximum clockwise angles from 3 nearest points

Help me, because I'm rly tired of this... I need to count angles between current point and the closest 3 points (look at an image below) - I need to sort the angles in descending order (to get the point with the largest angle - if it doesn't fit…
Nickon
  • 9,652
  • 12
  • 64
  • 119
-1
votes
3 answers

Slingshot action (movement) without cocos-2d

I want to create a game in which the sling shot will be used like in angry birds or sling shot game. I want to ask can is this possible to make the slingshot action like it throws at object in the angle with out cocos-2d. Please help me how should I…
Gypsa
  • 11,230
  • 6
  • 44
  • 82
-1
votes
1 answer

Angle facing other way libgdx

I figured out the convertion of x and y of my cursor to angle however the problem is my sprite is facing the oposite direction. here is the code @Override public void create() { bida = new…
CodeAndWave
  • 1,586
  • 3
  • 23
  • 33
-1
votes
1 answer

Random angle in matlab

I'm trying to write a matlab program which is able to a random walk, but each step/vector has the same length and the thing that determines the direction is a "random" angle. The angle is not quite random since it has some specific boundary…
Pall Axel
  • 13
  • 4
-1
votes
2 answers

C# Managed DirectX - How can i rotate a Mesh to any Vector?

I want to write a Funktion where i can rotete a Mesh to a Point in 3D Space. But i cant find any Examples for my Solution. It should look like the following Code: public void RotateMesh(Vector3 MeshPos, Vector3 TargedPos) { ... Do…
ZeraTFK
  • 1
  • 4
-1
votes
1 answer

Get angle between 2 points

There's a player. While moving cursor Id like to get angle between player and cursor. My code for this is : public void mouseMoved(MouseEvent ev) { float angle = (float) Math.toDegrees(Math.atan2(ev.getX() - player.getCenterX(), …
user2102972
  • 251
  • 2
  • 6
  • 13
-1
votes
1 answer

How to draw a triangle by two(or three) given angles with angles written at each corners in actionscript ?

I tried to google it but couldn't find a solution.there are method to draw a triangle with one given angle and two lengths .but i want to draw triangle with given two angles.Can some one guild me..
-1
votes
1 answer

Condition in constructor javavascript

I want to add condition in constructor for angle if(angle>360){ angle=0; } how to do? PLAYER[i] = { color: "#fff", x: 220*i, y: 270, width: 32, height: 32, angle: 180 }; each time to use such a condition, takes a lot of…
Arti
  • 7,356
  • 12
  • 57
  • 122
-1
votes
5 answers

Java Math.cos(Math.toRadians()) returns weird values

I've got a little Problem with the Math.cos() method. I know, I have to convert the angle to Radians before using Math.cos(). But if I just do: System.out.println(Math.cos(Math.toRadians(90)); It outputs: 6.123233995736766E-17 Math.sin() is working…
user1432679
  • 17
  • 1
  • 4
-2
votes
1 answer

Why are the angles calculated in c++ not accurate?

I wanted to write a turtle in c++, but the angles at the turn are not accurate. I tried to create a Koch curve, but the result was bad Hereis a larger picture of this, it looks like the angles are wrong This is my program: #include…
RBL12C
  • 5
  • 5
-2
votes
1 answer

Java a way to get from an angle the atan2 value (alpha)?

double dx = mx - px; double dy = my - py; double alpha = Math.atan2(dy, dx); float angle = (float) Math.toDegrees(alpha); angle += 10; Now I want to convert the angle to the alpha value (atan2) is there a way how i can do…
CodingJava
  • 17
  • 2
-2
votes
1 answer

How to flip an angle

I'm working with a robot and right now the angle is setup to be between -179 to 180. The thing is the angle accumulation is opposite that of cartesian coords which is a headache. So if the robot is facing 90 degrees and turns 45 to the left: instead…
-2
votes
1 answer

Why won't Pythagorean theorem work for me?

How do i check if the follow is a right angled triangle? I have: A = 5 B = 1 C = ? How do i know if this IS or ISNT a right angle? please help!