about summary refs log tree commit diff
path: root/users/sterni/nix/num/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-08-09 r/6478 feat(sterni/nix): add trivial float librarysterni1-0/+1
Only implements the different conversion types from and to ints for now. Unfortunately very reliant on builtins.{floor,ceil} which can't be implemented purely except very inefficiently (to my knowledge), so it only really works for C++ Nix >= 2.4. Tests are thus skipped for C++ Nix 2.3. Change-Id: Idcb1a11df11e214cdba3f2a0715472b370daa7dc Reviewed-on: https://cl.tvl.fyi/c/depot/+/9008 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2023-08-09 r/6477 refactor(users/sterni/nix): move generic number operation into numsterni1-0/+16
We omit type checks for performance reasons in most places currently, so the library grouping is important in showing people what to use for what sort of input. The moved functions make sense to use with floats as well, so we'll move them to the num library. Some of the remaining functions could theoretically be adapted and moved, but aren't for now. Change-Id: Ifdecaa60be594f4438b2a58b9ea6445e2da080e3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9007 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>