172 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-4
votes
1
answer
113
views
Pygame image not facing the mouse [duplicate]
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 = ...
2
votes
3
answers
293
views
Want to convert degrees to radians and have the answer output symbolically
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 ...
0
votes
0
answers
40
views
Using Positioned with Offset.fromDirections in Flutter
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 ...
33
votes
2
answers
4k
views
Why do trigonometric functions give a seemingly incorrect result? [duplicate]
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. ...
0
votes
0
answers
347
views
Do we have an equivalent of rad2deg() in C++?
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°
0
votes
1
answer
2k
views
trying to print degree symbol after integer
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 ...
1
vote
1
answer
81
views
Angle to cursor, with different orientation of zero degrees
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 ...
-1
votes
1
answer
770
views
Get closest coördinates from a list based in Google Sheets
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 ...
0
votes
1
answer
807
views
How to convert radians to degrees where 0° is north
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 ...
0
votes
1
answer
243
views
OpenGL Drawing 2 vectors with a given angle between them
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:
...
0
votes
2
answers
484
views
get an angle between 2 points and rotate a point about an other point with this angle - C++
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 ...
0
votes
1
answer
649
views
How would you write a javascript function that slowly declerates a spin wheel to a pre-determined position?
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 ...
1
vote
1
answer
2k
views
how to make this type gauge in flutter with dynamic section
return SfRadialGauge(
title: GaugeTitle(
text: 'Speedometer',
textStyle:
const TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)),
axes: <RadialAxis>[
...
0
votes
1
answer
120
views
Calculate pi of a radian that can be negative or positive?
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 ...
0
votes
1
answer
640
views
how to format radians units in x axis in MATLAB?
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 ...