terminal/src/til
Dustin L. Howett (MSFT) dfc15780c7
add til::math, use it for float conversions to point, size (#5150)
This pull request introduces the `til::math` namespace, which provides some casting functions to be used in support of `til::point` and `til::size`. When point/size want to ingest a floating-point structure, they _must_ be instructed on how to convert those floating-point values into integers.

This enables:

```
Windows::Foundation::Point wfPoint = /* ... */;
til::point tp{ til::math::rounding, wfPoint };
```

Future thoughts: should the TilMath types be stackable? Right now, you cannot get "checked + rounding" behavior (where it throws if it doesn't fit) so everything is saturating.

## PR Checklist
* [x] Closes a request by Michael
* [x] I've discussed this with core contributors already
2020-03-27 22:48:49 +00:00
..
ut_til add til::math, use it for float conversions to point, size (#5150) 2020-03-27 22:48:49 +00:00
dirs Introduce til::some (#4123) 2020-01-09 09:07:52 -08:00
precomp.cpp Introduce til::some (#4123) 2020-01-09 09:07:52 -08:00
precomp.h til::size (#4850) 2020-03-10 20:51:26 +00:00