Skip to content

Math tools: a unit converter - #41

Open
simonebortolin wants to merge 5 commits into
ccr-f0e25fb4-eczbl3-formulasfrom
ccr-f0e25fb4-eczbl3-units
Open

simonebortolin wants to merge 5 commits into
ccr-f0e25fb4-eczbl3-formulasfrom
ccr-f0e25fb4-eczbl3-units

Conversation

@simonebortolin

Copy link
Copy Markdown
Owner

Stack 4/4: editor fences fix → keypad → formulas → this.

The third page of the math tools. A value in a unit is converted to another unit of the same quantity, and shown in all of them. Quantities: length, area, volume, mass, time, speed, temperature, energy, pressure, angle and data.

  • Units (Units): exact factors where they are defined (inch, pound, US gallon). Temperature uses an offset.
  • Results: written as UnicodeMath and drawn by a MathView. Values have six significant digits, with scientific notation for very large and very small ones. The unit is quoted text after a space, which ends an exponent: otherwise the unit would go into 10⁶.
  • Input: a point or a comma before the decimals, −, and exponents (1.5e3).

Tests

  • MathTools/UnitsTests: known conversions and their inverses, the formatting, the numbers typed, every symbol parses, and the unit is not in the exponent.
  • MathTools/MathToolsWindowTests.UnitsConvert: km→mi, swap, °F→°C, and a value that is not a number.

Generated by Claude Code

The third page of the math tools: a value in a unit of length, area, volume,
mass, time, speed, temperature (with an offset), energy, pressure, angle or data,
in another unit and in all of them, written as UnicodeMath (six significant
digits, scientific notation for very large and very small values) and drawn by
a MathView. Tests: known conversions and their inverses, the formatting, the
numbers typed, the symbols, and the page in the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyVio8afJsGwHW9i5v5HDs
@github-actions

Copy link
Copy Markdown

Pre-release 1.1.0-pr.41.111 is ready: https://github.com/simonebortolin/SharpEquations/releases/tag/pr-41-111-1

NuGet package of cb870f5. Updated on every push, deleted when this PR is closed.

@simonebortolin
simonebortolin added this pull request to stack #34 November 11, 2026 19:16

This branch has not been deployed

No deployments
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.

2 participants