• Skates@feddit.nl
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    Oldman.setHealth(“dicktits”); //normalize pls

    Oldman.setHealth(“-100±1%”); //make percentage pls

    Oldman.setHealth(0.0); //it is subunitary, but undefined behavior - will it access the ‘numeric value’ overload, or the ‘subunitary numeric value’ overload?

    Don’t write your own code just yet.