Skip to content

Commit bd0dfec

Browse files
gambon2010gambon0120
andauthored
Fix incorrect Unit.Joule conversion factor in Energy class (#307)
* fix joule conversion, added changelog message --------- Co-authored-by: gambon0120 <christophe@fritschy.net>
1 parent a98116f commit bd0dfec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed `Unit.Joule` conversion factor in `Energy` class returning incorrect foot-pounds to Joules values.
12+
1013
## [2.2.8] - 2026-01-26
1114
[:simple-github: GitHub release][2.2.8]
1215

py_ballisticcalc/unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ class Energy(GenericDimension):
11451145

11461146
_conversion_factors = {
11471147
Unit.FootPound: 1.0,
1148-
Unit.Joule: 1.3558179483314,
1148+
Unit.Joule: 1 / 1.3558179483314,
11491149
}
11501150

11511151
# Energy.* unit aliases

0 commit comments

Comments
 (0)