aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
AgeCommit message (Collapse)Author
2020-05-01ZIR: add cmp and condbr instructionsAndrew Kelley
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-04-16std: make math.clamp work for common uses, remove automatic bounds swappingAndrius Mitkus
2020-03-24std: Add qNaN constantsLemonBoy
2020-03-05std: use testing.expectEqual in math.absCast testsdaurnimator
2020-03-05std: fix math.absCast on i1daurnimator
2020-03-04std: Use @TypeOf(x,y) as return value for maxLemonBoy
2020-02-24remove uses of `@ArgType` and `@IntType`Vexu
2020-02-24remove usages of `@typeId`, `@memberCount`, `@memberName` and `@memberType`Vexu
2020-01-14Add clamp function to math moduleHersh Krishna
2020-01-01std.mem.compare: breaking API changesAndrew Kelley
* `std.mem.Compare` is now `std.math.Order` and the enum tags renamed to follow new style convention. * `std.mem.compare` is renamed to `std.mem.order`. * new function `std.math.order`
2019-12-16allow comparison of any numeric typesAndrew Kelley
2019-12-16std: lessThan and greaterThan between signed and unsignedShawn Landden
It is a deviation from C, but I think we should consider making this the behavior of the operators. See #2133
2019-12-10Replace @typeOf with @TypeOf in all zig sourceRobin Voetter
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-11-29std.math: remove constants that should be expressionsAndrew Kelley
All four of these can be represented in fewer characters with expressions, which will be guaranteed to happen at compile-time, and have the same or better precision. The other math constants here which depend on function calls could be similarly removed if and when #425 is solved. However I left them for now since Zig does not eagerly evaluate functions with comptime parameters.
2019-11-19add `std.math.tau` constant (equivalent to 2 * pi)dbandstra
2019-11-08update more of the std lib to use `@as`Andrew Kelley
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-10-24refAllDecls in a test block to limit when it gets runAndrew Kelley
2019-10-16ref more math decls for better docsAndrew Kelley
2019-10-16turn comments into doc commentsAndrew Kelley
2019-10-16Add 'missing' consts to math.zigSebsatian Keller
The C library defines constants for log2e and sqrt2 etc. Those should also be available in zig.
2019-10-09generated docs: render valuesAndrew Kelley
also fix pressing enter in search box before search finishes closes #3409
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221