Skip to main content
Filter by
Sorted by
Tagged with
-4 votes
1 answer
113 views

Here is my rotating code: pos = pygame.mouse.get_pos() x_dist = pos[0] - self.rect.centerx y_dist = -(pos[1] - self.rect.centery) self.angle = math.degrees(math.atan2(y_dist, x_dist)) self.image = ...
Aadvik's user avatar
  • 1,522
2 votes
3 answers
291 views

I am using the Sympy library in Python, and I'm trying to convert degrees to radians, and have the output rendered symbolically. Sympy does not have a function for converting degrees to radians, but ...
Seth L.'s user avatar
  • 41
0 votes
0 answers
40 views

I am currently trying to place Image.asset widgets in a circle based on the degrees. I have tried using the Positioned and Offset.from Direction, but the values seem to be off. I have split the ...
gputhige's user avatar
  • 139
33 votes
2 answers
4k views

When attempting to use a trigonometric function in my programming language, I get a seemingly wildly incorrect result. For example, sin(90) = 0.8939966636005579 But I would expect sin(90) to be 1. ...
Justine Krejcha's user avatar
0 votes
0 answers
344 views

Do we have an equivalent of rad2deg() in C++ ? rad2deg() is available in php, perl, Matlab, numpy-python, etc. It converts radians to degrees. This is the relationship: π radian = 180°
Talha Tayyab's user avatar
  • 30.8k
0 votes
1 answer
2k views

I am trying to do the find-angle challenge in hacker rank, I got the value of the angle as an integer but hacker rank requires me to give the output with " ° " symbol at the end, how do I ...
potato_noodles's user avatar
1 vote
1 answer
81 views

I'm trying to make a utility function to determine the angle from an element to the mouse cursor, but allow our devs to change where 0 is located. So this needs to return the angle as degrees between ...
Drew Baker's user avatar
  • 14.5k
-1 votes
1 answer
769 views

I have seen a similar question here, but that answer did not to the job for me yet. We have a Google Sheets doc with 46 adresses, and converted longitude and latitude from that location. Now we would ...
Marc Lonsain's user avatar
0 votes
1 answer
806 views

Technology MySQL Problem Given is a radian value that defines the direction. This radian can be easily converted to degrees (f.e. 1 radian = 57.296°). But this would result in the following: 0° would ...
Pieter Pauwels's user avatar
0 votes
1 answer
243 views

I'm trying to draw in OpenGL 2 vectors with a given angle (in radians) between them, something like this: I managed to draw the vectors but I'm not sure how to place them at the specific angle: ...
Paul C's user avatar
  • 27
0 votes
2 answers
484 views

I'm basically trying to create 2D lines based on points from bezier curves. All the points of the bezier curves are well placed and everything seems in order. Starting with these points I'm creating 2 ...
UnchartedLine's user avatar
0 votes
1 answer
649 views

I'm coding a spin wheel where the result is already determined server-side. Having the wheel land on the pre-determined result is easy. You just set the number of radians at which the wheel stops ...
Myles's user avatar
  • 101
1 vote
1 answer
2k views

return SfRadialGauge( title: GaugeTitle( text: 'Speedometer', textStyle: const TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)), axes: <RadialAxis>[ ...
Sachin Suthar's user avatar
0 votes
1 answer
120 views

I have a variable A which is a radian angle value. I also have a variable B that should always be PI away from A. How can I verify that B is PI off of A with 0.01 accuracy in negative or positive ...
hedeic's user avatar
  • 41
0 votes
1 answer
640 views

I have a data file of 77*1 which is changing based on radians. I plotted my data and its ok in terms of figure itself. however, the x axis turned to be some random numbers. How can I define the thick ...
ARAZ's user avatar
  • 5
0 votes
1 answer
971 views

I made a code converting degrees to radians following my teacher's format but I want to try to make it in terms of pi. Right now when I plug in 30 as my degrees the output is a loooong decimal but I ...
Username978's user avatar
-4 votes
1 answer
643 views

I'm creating own Turtle app similar to python in Java. The angles taken in the instructions is in degrees. While drawing it, I have to use sin and cos which requires the angle to be in radians. So, I ...
Ruthvik's user avatar
  • 840
0 votes
1 answer
96 views

I am using LibGDX to make an orbit simulator (elliptical as planets possess their own initial velocity) and I have the physics mapped out like so: public void move(float deltaTime, Planet planet) {...
eisa.exe's user avatar
-1 votes
2 answers
161 views

I have been stuck on this for a very long bit of time. How do I make my calculator calculate in degrees rather than radians. I tried Math.toDegrees but it did not work. Thank you if you decide to help....
bruh's user avatar
  • 1
-1 votes
1 answer
415 views

This is the code This is the Output I am getting Console.Write("Enter angle in degrees: "); // angle == 90 float angle = float.Parse(Console.ReadLine()); float radian = angle * (MathF.PI / ...
Priyanshu_ashu's user avatar
0 votes
1 answer
180 views

I would like to format pi-based the y-axis which is in radians. However, when I try to test a previous solution How can I set the y axis in radians in a Python plot?, the result changes the scale ...
user1993416's user avatar
1 vote
0 answers
33 views

I try to work with forms using CGI-scenarios. I have file servercgi.py which i use to start my server. I have form where I input three numbers. Here is code from html: <form action="/cgi-bin/...
Andy's user avatar
  • 81
1 vote
4 answers
109 views

I'm trying to make a clock for a Libet task - a cognitive task used by psychologists. By convention these clocks take 2560 ms to complete a revolution. Mine seems to be running quite a lot slower and ...
M.L.'s user avatar
  • 128
0 votes
1 answer
241 views

So I have the following javascript code: function dosine(){ var num = document.getElementById('num').value; console.log(num); num = (num*Math.PI)/180; num = Math.sin(num); ...
CoderMan's user avatar
2 votes
3 answers
642 views

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 ...
user366312's user avatar
  • 17.5k
0 votes
3 answers
385 views

I am writing an algorithm which should be able to determine in which quadrant a radian is based on two values that the user inputs. I think that the code is calculating the radian but I know that ...
Timur Urcan's user avatar
1 vote
1 answer
412 views

using System; namespace ProgrammingAssignment2 { /// <summary> /// Programming Assignment 2 /// </summary> class Program { // x and y coordinates for points ...
Raj Thakkar's user avatar
-1 votes
3 answers
270 views

If I have an angle theta (radians), a small angle delta (radians) and a target angle theta prime (radians), how can I increment/decrement theta by delta such that it would move closer to the angle ...
omega's user avatar
  • 44.6k
0 votes
0 answers
409 views

Currently I am trying to populate the distance between 2 coordinates in Access. I found a VBA function online that allows me to use ACOR and RADIANS in access. The function worked, but when I attempt ...
Sebastian's user avatar
0 votes
0 answers
80 views

I am calculating the following lines in Octave: DOA = [2.44511697; 171.03810943; -54.15891743; -106.57844237]; alfa = tand(DOA); 0.042701 -0.157703 -1.384441 3.359049 in radians I get the ...
Achim's user avatar
  • 11
0 votes
2 answers
68 views

I want to write the values of a sine function to a text file. The function is In my graphing calculator, I also have to add π if I want to plot the function in radians. How do I have to write this ...
Daniel's user avatar
  • 564
0 votes
3 answers
200 views

I am having trouble inputting the radius of a circle and angle of a circle (deg) while receiving the output with the values given plus the angle in radians, arc length and polar area all as floats. ...
rutmac2's user avatar
4 votes
2 answers
38k views

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,...
Ams1901's user avatar
  • 129
3 votes
1 answer
4k views

I made a simple slider in control panel to modify the position and rotation of an object. I have no problem with the position, as the values are relative, but I'd like to show the rotation's values in ...
Afx Crush's user avatar
  • 263
0 votes
3 answers
6k views

i'm writing a code in Python 3 to do some calculus with some parameters that user enters with keyboard. When I was testing the program I faced and isolated the next problem: Evaluating the angle in ...
Jdavid_Ar08's user avatar
0 votes
0 answers
29 views

there is a lots of material about this, its just my english skills of issue that mostlikely now confuses me. I have a character, position x, y. It's angle is a. a is in angles (0 - 359). View of sight ...
E.K.Virtanen's user avatar
2 votes
1 answer
441 views

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....
user3486773's user avatar
  • 1,278
0 votes
0 answers
267 views

I tried to write a program where a vector is calculated that bisects the angle between two lines that share one common point. For that I've come up with some code (Since this it not the only thing I'm ...
flxwly's user avatar
  • 3
0 votes
2 answers
250 views

This works: SELECT ( radians( 44.43763930 ) ) This doesn't: SELECT ( radians( SELECT latitude FROM ...
Andrei's user avatar
  • 183
2 votes
2 answers
1k views

I want to give out an angle in radians in python. I also know how to do that but is it posible to make the output like that 1 * pi instead of 3.14159 without programming it myself? Thx for help.
Beat's user avatar
  • 75
2 votes
2 answers
2k views

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. ...
AnimateMe's user avatar
5 votes
1 answer
161 views

I have number of days from 1 to 180 days, decreasing and increasing dates from the date $epoch='2020-05-11'. The full period = 365.25 days, an amplitude, a frequency and a phase will be added later in ...
Peri's user avatar
  • 81
0 votes
2 answers
573 views

I have an array A, array([[ 1, 2, 25], [ 3, 4, 23], [ 2, 6, 55], [ 9, 7, 78], [11, 5, 47]]) I changed the last column of the array, supposedly degree values (25,23,55,...
Sam's user avatar
  • 53
0 votes
1 answer
1k views

im trying to make line in canvas to follow mouse position in 360 degrees, starting from circle center. This is my code so far but i cant make right angles. Any solution thanks. https://jsfiddle.net/...
Kuris's user avatar
  • 73
0 votes
1 answer
1k views

I want to convert radians to degrees with a round off function. The degrees should come between 0-360 for all the radian values. Say, the value I want to convert is 300(in radians) So, 300*57.3 = ...
InVinci's user avatar
  • 71
0 votes
1 answer
701 views

I have little bit awkward question but I couldn't figure it out by myself. I'm working on a dataset generator for my NN in Keras, and I'm feeding it with values represented as degrees (it must be ...
Olinuxx's user avatar
0 votes
1 answer
672 views

just looking for an easy way to run trig functions in SAS without having to manually correct in each calculation. Below is what I am working with. I am running this in SAS 9 probably, the SAS Studio ...
Tim Rykken's user avatar
0 votes
0 answers
35 views

I'm having issues positioning the cursor at the right point in this circular time scrubber: I'm calculating angle with simple formula: Math.atan2(y, x). This gives me the angle in radians, then I map ...
S.C.'s user avatar
  • 2,864
0 votes
1 answer
1k views

I am working on wind power and speed u and vare zonal and meridional wind. (I have the values of these 2 vectors) The wind speed is calculated by V = np.sqrt(u2*v2) Wind direction is given by α ...
chantal dem's user avatar
5 votes
1 answer
355 views

I'm using the following code to convert radians to degrees and do some arithmetic on the same. private double getDegrees(double rad) { double deg = rad * Mathf.Rad2Deg; double degree = (-...
user avatar