Skip to content

Commit d2e5413

Browse files
committed
docs(changelog): Document World construction helper functions
Add entry for User Story #30 implementation describing the 5 new helper functions, their benefits (reduced boilerplate), backward compatibility, and comprehensive test coverage.
1 parent 1d8abe5 commit d2e5413

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ SPDX-License-Identifier: AGPL-3.0-or-later
99

1010
### Added
1111

12+
- **Core**: World construction helper functions in `include/openpfc/core/world.hpp`
13+
providing ergonomic, zero-cost abstractions for common grid creation patterns.
14+
Added 5 inline helper functions: `uniform(int)` and `uniform(int, double)` for
15+
N³ grids, `from_bounds(...)` for automatic spacing computation from physical
16+
bounds (periodic/non-periodic aware), `with_spacing(...)` for custom spacing
17+
with default origin, and `with_origin(...)` for custom origin with unit spacing.
18+
All helpers include input validation with clear error messages. Reduces
19+
boilerplate from `world::create({64,64,64}, {0,0,0}, {1,1,1})` to
20+
`world::uniform(64)`. Backward compatible - existing `create()` API unchanged.
21+
Comprehensive test coverage (32 new assertions). Example program added in
22+
`examples/world_helpers_example.cpp`. (User Story #0030)
1223
- **Core**: Mathematical constants in `include/openpfc/constants.hpp` for
1324
compile-time evaluation with zero runtime overhead. Added 12 constants: π,
1425
2π, π/2, π/4, 1/π, √π, √2, √3, e, ln(2), ln(10), and φ (golden ratio).

0 commit comments

Comments
 (0)