Skip to content

what for max() function? #5

@mistepien

Description

@mistepien

Why in library max() function is used

word SegaController::getState() { if (max(millis() - _lastReadTime, 0) < SC_READ_DELAY_MS)

instead of

word SegaController::getState() { if ((millis() - _lastReadTime) < SC_READ_DELAY_MS) {

What is a gain of using max() function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions