Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
340d8c2a
Commit
340d8c2a
authored
Mar 11, 2018
by
Matthieu Schaller
Browse files
Added the gravitational potential as one of the default unit conversion schemes.
parent
19e7b795
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/units.c
View file @
340d8c2a
...
...
@@ -220,6 +220,11 @@ void units_get_base_unit_exponants_array(float baseUnitsExp[5],
baseUnitsExp
[
UNIT_TIME
]
=
-
2
.
f
;
break
;
case
UNIT_CONV_POTENTIAL
:
baseUnitsExp
[
UNIT_LENGTH
]
=
2
.
f
;
baseUnitsExp
[
UNIT_TIME
]
=
-
2
.
f
;
break
;
case
UNIT_CONV_FORCE
:
baseUnitsExp
[
UNIT_MASS
]
=
1
.
f
;
baseUnitsExp
[
UNIT_LENGTH
]
=
1
.
f
;
...
...
src/units.h
View file @
340d8c2a
...
...
@@ -73,6 +73,7 @@ enum unit_conversion_factor {
UNIT_CONV_DENSITY
,
UNIT_CONV_SPEED
,
UNIT_CONV_ACCELERATION
,
UNIT_CONV_POTENTIAL
,
UNIT_CONV_FORCE
,
UNIT_CONV_ENERGY
,
UNIT_CONV_ENERGY_PER_UNIT_MASS
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment