Skip to content

Conversation

@Miniongolf
Copy link

@Miniongolf Miniongolf commented Dec 31, 2024

Summary

Adds comparisons, operators, and assignments to combinations of Numbers and doubles

Motivation

Makes working with Numbers more seamless, being able to compare them and use operators with doubles (e.g. 1_num < 2 or 3_num * 1).

Test Plan

All static_asserts in numberOperatorTests() found in ./src/main.cpp passed, the assignment operators cannot be constexpred and will be tested on hardware.

Additional Notes

Doubles cannot be initialized with a number (e.g. double d = 1_num fails).

@Miniongolf Miniongolf changed the title Number double operators ✨ Number double operators Dec 31, 2024
@Miniongolf Miniongolf changed the title ✨ Number double operators ✨ Number and double operators Dec 31, 2024
Copy link
Member

@SizzinSeal SizzinSeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SizzinSeal SizzinSeal merged commit a6e91d2 into LemLib:main Jan 2, 2025
2 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