File tree 1 file changed +6
-2
lines changed
exercises/concept/strange-stopwatch/.docs
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Hints
2
2
3
+ Using complex numbers for rotations in 2D can leave things much cleaner and numerically more precise.
4
+
3
5
## 1. Define a 2D vector rotation function
4
6
5
7
- [ Euler's formula] [ euler ] is your friend here.
14
16
15
17
## 3. Define a function to tell the time on the stopwatch
16
18
17
- - Use your ` timearg ` function.
19
+ - This is a good opportunity to use your ` timearg ` function.
18
20
- There is an inbuilt method [ rad2deg] [ rad2deg ] to convert from radians to degrees.
19
21
- Minutes are the [ ` abs ` ] [ abs ] value of the vector.
20
22
21
23
## 4. Define a function to set a timer
22
24
23
- - Consider using the [ polar form] [ euler ] of a complex number.
25
+ - Consider using the [ polar form] [ euler ] of a complex number (e.g. ` m*ℯ^(iθ) ` ).
26
+ - There is an inbuilt method [ deg2rad] [ deg2rad ] to convert from degrees to radians.
24
27
- A rotation may be needed to redefine the zero point.
25
28
26
29
[ euler ] : https://docs.julialang.org/en/v1/base/math/#Base.cis
30
33
[ angle ] : https://docs.julialang.org/en/v1/base/math/#Base.angle
31
34
[ abs ] : https://docs.julialang.org/en/v1/base/math/#Base.abs
32
35
[ rad2deg ] : https://docs.julialang.org/en/v1/base/math/#Base.Math.rad2deg
36
+ [ deg2rad ] : https://docs.julialang.org/en/v1/base/math/#Base.Math.deg2rad
You can’t perform that action at this time.
0 commit comments