Skip to content

feat: add affine temperature conversions and explicit deltas - #44

Merged
ScottishTapWater merged 2 commits into
mainfrom
feat/affine-temperature-deltas
Oct 25, 2026
Merged

ScottishTapWater merged 2 commits into
mainfrom
feat/affine-temperature-deltas

Conversation

@ScottishTapWater

Copy link
Copy Markdown
Contributor

Summary

  • Rename the standalone Temperature alias to AbsoluteTemperature while keeping the mathematical temperature dimension and compound names unchanged.
  • Add Delta<TQuantity> and Quantity<TDimension>.AsDelta() to explicitly reinterpret the stored SI magnitude as a difference.
  • Add affine Celsius and Fahrenheit conversions via [AffineUnit]; generated delta accessors use scale without offsets, including for Kelvin and Rankine.
  • Explain the absolute/delta behaviour in the README.

Validation

  • dotnet test src/DimensionalQuantities.slnx --no-restore -v:q — 1,030 passed.
  • dotnet format src/DimensionalQuantities.slnx --verify-no-changes --no-restore -v:q — passed.
  • Packaged integration test covers a Metric producer returning Delta<AbsoluteTemperature> and a consumer referencing Metric and Imperial together.

API note

Temperature is no longer generated as a standalone alias. Callers should use AbsoluteTemperature. .AsDelta() preserves the current SI magnitude; it does not infer whether subtraction occurred.

@ScottishTapWater ScottishTapWater changed the title feat: add affine temperature conversions and explicit deltas feat!: add affine temperature conversions and explicit deltas Oct 25, 2026
@ScottishTapWater

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T15:37:18.975565Z d8b8e49 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: d8b8e4979f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ScottishTapWater ScottishTapWater changed the title feat!: add affine temperature conversions and explicit deltas feat: add affine temperature conversions and explicit deltas Oct 25, 2026
@ScottishTapWater
ScottishTapWater enabled auto-merge (squash) October 25, 2026 15:52
@ScottishTapWater
ScottishTapWater merged commit e58c5a9 into main Oct 25, 2026
2 checks passed
@ScottishTapWater
ScottishTapWater deleted the feat/affine-temperature-deltas branch October 25, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant