Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transform): Add Number Minimum Transform #196

Merged
merged 3 commits into from
Jul 2, 2024
Merged

Conversation

jshlbrd
Copy link
Contributor

@jshlbrd jshlbrd commented Jul 2, 2024

Description

  • Adds a new number transform to return the smaller of two values

Motivation and Context

This is a wrapper around Go's math.Min function that works with Substation's data and JSON message formats, and is a peer to #195. If used with number_maximum this allows users to "clamp" numbers between a range, which is added as a config pattern in this PR.

How Has This Been Tested?

Added unit tests and examples.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshlbrd jshlbrd marked this pull request as ready for review July 2, 2024 21:03
@jshlbrd jshlbrd requested a review from a team as a code owner July 2, 2024 21:03
@jshlbrd jshlbrd merged commit ea5a592 into main Jul 2, 2024
4 checks passed
@jshlbrd jshlbrd deleted the jshlbrd/feat/tf-num-min branch July 2, 2024 21:32
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.

None yet

2 participants