All right, we just went thru the JS Math object and reviewed every single function for inclusion into CSS. Results:
-
-
Secondary straw poll: If you want to add 0 or 1 to a value based on whether another calculation is even or odd, which do you prefer? (plz RT this one as well)
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
I don't have a strong preference, though if you go with -3px, you may want to rename the operation rem(). That's what we did with Webassembly.
-
That's... not a terrible idea.
- Još 4 druga odgovora
Novi razgovor -
-
-
That's gonna get really odd if 0 is in the middle of the range and half way through the behavior changes.
-
Can you elaborate?
- Još 11 drugih odgovora
Novi razgovor -
-
-
But a mod result is never a negative digit according to math! So math.https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/what-is-modular-arithmetic …
-
The "math style" does indeed take the sign from the divisor (second argument), so that question does indeed always have a positive answer. But you can also have something like `8 % -5`, which can be either 3 or -2 (math says -2, JS says 3)
- Još 5 drugih odgovora
Novi razgovor -
-
-
In a vacuum qI'd prefer the answer 2 here... but for CSS in particular I voted -3 because consistency with JS seems important to avoid confusion.
-
That's the strong argument for -3, yeah, but given the *next* poll, I think most people don't actually understand the implications of it (and just write buggy code), so giving 2 would actually provide better results.
Kraj razgovora
Novi razgovor -
-
-
Whew, was afraid of my math skills there for a moment :p
-
Both are potentially correct! Just depends on what semantics you want to go with. (If you have an "integer division" operator, there's a "natural" answer depending on how that works, but CSS doesn't so both are possible.)
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
Gendermeh, “they” plz.