Skip to content

Implement initial temperature modules#20

Merged
theredfish merged 2 commits intotheredfish:mainfrom
JustusFluegel:add-temperature-module
Mar 6, 2026
Merged

Implement initial temperature modules#20
theredfish merged 2 commits intotheredfish:mainfrom
JustusFluegel:add-temperature-module

Conversation

@JustusFluegel
Copy link
Contributor

Adds Temperature<Unit>, DynamicTemperature and DynamicRange structs, with the units Kelvin, Celsius and Fahrenheit.

TODO: Write unit tests, add code documentation and examples.

Note that Temperature<Unit> implements PartialEq which is probably not the best idea to use since .eq on floats can be finicky, you probably want to use a PartialOrd with a epsilon e instead, which the struct also implements.

You might wish to use f64 over f32 in the Temperature.

Signed-off-by: Justus Fluegel <justusfluegel@gmail.com>
…TOR respectively to better represent their purpose

Signed-off-by: Justus Fluegel <justusfluegel@gmail.com>
@theredfish theredfish merged commit f1f55ad into theredfish:main Mar 6, 2026
2 of 3 checks passed
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