Skip to content

Commit 684bc2e

Browse files
committed
Use deg2rad rather than ad-hoc conversion.
1 parent 541accf commit 684bc2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Mesh/Transformations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ julia> rotatex!(m, θ)
8282
```
8383
"""
8484
function rotatex!(m::Mesh, θ)
85-
trans = CT.LinearMap(Rotations.RotX(θ*pi/180))
85+
trans = CT.LinearMap(Rotations.RotX(deg2rad(θ)))
8686
transform!(m, trans)
8787
end
8888

@@ -105,7 +105,7 @@ julia> rotatey!(m, θ);
105105
```
106106
"""
107107
function rotatey!(m::Mesh, θ)
108-
trans = CT.LinearMap(Rotations.RotY(θ*pi/180))
108+
trans = CT.LinearMap(Rotations.RotY(deg2rad(θ)))
109109
transform!(m, trans)
110110
end
111111

@@ -128,7 +128,7 @@ julia> rotatez!(m, θ);
128128
```
129129
"""
130130
function rotatez!(m::Mesh, θ)
131-
trans = CT.LinearMap(Rotations.RotZ(θ*pi/180))
131+
trans = CT.LinearMap(Rotations.RotZ(deg2rad(θ)))
132132
transform!(m, trans)
133133
end
134134

0 commit comments

Comments
 (0)