Bug 259690 - [CSS Math Functions] Correct mod() evaluation
Summary: [CSS Math Functions] Correct mod() evaluation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-01 10:04 PDT by Tim Nguyen (:ntim)
Modified: 2023-08-01 10:52 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2023-08-01 10:04:21 PDT
According to https://drafts.csswg.org/css-values/#round-func :

Their behavior diverges if the A value and the B step are on opposite sides of zero: mod() (short for “modulus”) continues to choose the integer multiple of B that puts the value between zero and B, as above (guaranteeing that the result will either be zero or share the sign of B, not A), while rem() (short for "remainder") chooses the integer multiple of B that puts the value between zero and -B, avoiding changing the sign of the value.
Comment 1 Radar WebKit Bug Importer 2023-08-01 10:04:33 PDT
<rdar://problem/113213059>
Comment 2 Tim Nguyen (:ntim) 2023-08-01 10:07:07 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16277
Comment 3 EWS 2023-08-01 10:52:23 PDT
Committed 266485@main (440d1baa8043): <https://commits.webkit.org/266485@main>

Reviewed commits have been landed. Closing PR #16277 and removing active labels.