Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
layer8
on Aug 18, 2022
|
parent
|
context
|
favorite
| on:
Show HN: I made a web-based notepad with a built i...
If you have abs(), you can use the following as a fallback:
min(a, b) = (a + b - abs(a − b)) / 2
max(a, b) = (a + b + abs(a − b)) / 2
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
min(a, b) = (a + b - abs(a − b)) / 2
max(a, b) = (a + b + abs(a − b)) / 2