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

Update for fix for #211 #214

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

jimwhitelaw
Copy link
Collaborator

Because scaleFactor in processPID() and conditionResponse() is a float, the product of (response * scaleFactor) is automatically cast to float and potentially loses data. This change makes scaleFactor a double as well, keeping response a full 64 bits wide.

Not all of the return statements in conditionResponse() had the explicit cast to double implemented previously; with this change the typecast is no longer needed as it always returns a double.

I have updated the comment/description for both methods to reflect the change in return type.

@PowerBroker2 PowerBroker2 merged commit 6c584d7 into PowerBroker2:master Jan 5, 2024
@jimwhitelaw jimwhitelaw deleted the 211-update branch March 29, 2024 04:00
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