# std.math: rework modf · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a2df84d0ffe3b7bce96f55a5d7063630aac75116)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a2df84d0ffe3b7bce96f55a5d7063630aac75116

Requested commit: a2df84d0ffe3b7bce96f55a5d7063630aac75116

Commit: a2df84d0ffe3b7bce96f55a5d7063630aac75116

Tree: b4ce817da6d3edf99422ebbcf72eb30540f6f4ea

Author: Sean

Committer: GitHub

## Message

```
std.math: rework modf

- Changed `modf_result` to `Modf` to better fit naming conventions
- Reworked `modf` to be far simpler and support all floating point types (as well as vectors) (I have done benchmarks and can confirm that the performance is roughly equivalent to the old implementation)
- Added more descriptive tests for modf
- Deprecated `modf32_result` and `modf64_result` in favor of `Modf(f32)` and `Modf(f64)` respectively

```

## Parents

- [2d443cdabf4fc3af8f325adc4b9a96c1f41005f0](https://git.cafe/gitcafe/zig/commit/2d443cdabf4fc3af8f325adc4b9a96c1f41005f0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a2df84d0ffe3b7bce96f55a5d7063630aac75116?format=markdown)
