Andrew Kelley
2ab7f31e99
std.math: remove constants that should be expressions
...
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-29 10:48:46 -05:00
dbandstra
b3539b40a6
add std.math.tau
constant (equivalent to 2 * pi)
2019-11-19 06:20:20 +00:00
Andrew Kelley
aa0daea541
update more of the std lib to use @as
2019-11-08 15:57:25 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as
2019-11-08 15:57:24 -05:00
Andrew Kelley
8591731f2b
refAllDecls in a test block to limit when it gets run
2019-10-24 00:32:18 -04:00
Andrew Kelley
f80c01f9d8
ref more math decls for better docs
2019-10-16 19:16:57 -04:00
Andrew Kelley
7598a579ff
turn comments into doc comments
2019-10-16 18:33:12 -04:00
Sebsatian Keller
1b07ff7be0
Add 'missing' consts to math.zig
...
The C library defines constants for log2e and sqrt2 etc. Those should also be available in zig.
2019-10-16 18:31:22 -04:00
Andrew Kelley
6d54e8fc3c
generated docs: render values
...
also fix pressing enter in search box before search finishes
closes #3409
2019-10-09 18:09:35 -04:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
...
that's all this commit does. further commits will fix cli flags and
such.
see #2221
2019-09-25 23:35:41 -04:00