Skip to content

Commit

Permalink
Merge pull request #37 from JuliaAstro/planet-inner-constructor
Browse files Browse the repository at this point in the history
Remove Planet inner constructor
  • Loading branch information
giordano authored Jul 9, 2017
2 parents ed717ac + 5762add commit 1dd6c4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ const planets =
0.04725744, 19.18916464 * AU, 30685.4*86400,
0.77263783, 74.01692503, 170.95427630, 313.23810451),
"neptune"=>Planet("neptune", 24622e3, 24764e3, 24341e3, 102.413e24,
0.00859048, 30.06992276 * AU, 60189*86400,
0.00859048, 30.06992276 * AU, 60189.0*86400,
1.77004347, 131.78422574, 44.96476227, -55.12002969),
"pluto"=>Planet("pluto", 1187e3, 1187e3, 1187e3, 0.01303e24,
0.24882730, 39.48211675 * AU, 90560*86400,
0.24882730, 39.48211675 * AU, 90560.0*86400,
17.14001206, 110.30393684, 224.06891629, 238.92903833))
5 changes: 0 additions & 5 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ struct Planet
asc_long::Float64
per_long::Float64
mean_long::Float64
Planet(name, radius, eqradius, polradius, mass, ecc, axis, period, inc,
asc_long, per_long, mean_long) =
new(String(name), Float64(radius), Float64(eqradius), Float64(polradius),
Float64(mass), Float64(ecc), Float64(axis), Float64(period), Float64(inc),
Float64(asc_long), Float64(per_long), Float64(mean_long))
end

# New type representation
Expand Down
2 changes: 1 addition & 1 deletion test/utils-tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ end
# Test xyz
let
local x, y, z, vx, vy, vz
x, y, z, vx, vy, vz = xyz([51200.5 + 64./86400.], 2000)
x, y, z, vx, vy, vz = xyz([51200.5 + 64 / 86400], 2000)
@test x [0.5145687092402946]
@test y [-0.7696326261820777]
@test z [-0.33376880143026394]
Expand Down

0 comments on commit 1dd6c4a

Please sign in to comment.