Skip to content

Conversation

phillip-hopper
Copy link
Collaborator

@phillip-hopper phillip-hopper commented Sep 30, 2020

Also fixed floating point errors that started happening after updating Windows and Visual Studio


This change is Reviewable

Also fixed floating point errors that started happening after updating Windows and Visual Studio
@tombogle
Copy link
Collaborator

I wonder if this is the desired behavior? I now recall having a discussion with @hatton (years back) and deciding that if the user left a small segment at the end that it was most likely just final cruft in the recording and would not need to be annotated. Now that we've decided that a valid segment can be less than 0.5 seconds, maybe we want to adjust the threshold for this as well, but still leave that logic in place. But maybe that was a bad decision, given Sarah's feedback.

public bool GetIsAcceptableSegmentLength(float start, float end)
{
return end - start >= Settings.Default.MinimumSegmentLengthInMilliseconds / 1000f;
return Math.Round(end * 1000 - start * 1000) >= Settings.Default.MinimumSegmentLengthInMilliseconds;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What sort of error was occurring? If this is the necessary fix, probably a comment is needed, lest it be put back later by someone wishing to make it more readable.

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.

3 participants