aboutsummaryrefslogtreecommitdiff
path: root/std/math/log.zig
diff options
context:
space:
mode:
authorJimmi HC <jhc@liab.dk>2018-06-05 11:14:43 +0200
committerJimmi HC <jhc@liab.dk>2018-06-05 11:14:43 +0200
commit02cb220faf0d527b656a3a87ec96e6738770c8e6 (patch)
tree5d79c58df7d786e3fa8adc0bc382fffa3ccafe60 /std/math/log.zig
parente53b683bd3958a7b1c517e2391edce42b9d4e48b (diff)
downloadzig-02cb220faf0d527b656a3a87ec96e6738770c8e6.tar.gz
zig-02cb220faf0d527b656a3a87ec96e6738770c8e6.zip
Renamed "(int/float literal)" to "comptime_int/float"
Diffstat (limited to 'std/math/log.zig')
-rw-r--r--std/math/log.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/math/log.zig b/std/math/log.zig
index 1cba1138db..2c876081d8 100644
--- a/std/math/log.zig
+++ b/std/math/log.zig
@@ -9,15 +9,15 @@ pub fn log(comptime T: type, base: T, x: T) T {
return math.log2(x);
} else if (base == 10) {
return math.log10(x);
- } else if ((@typeId(T) == TypeId.Float or @typeId(T) == TypeId.FloatLiteral) and base == math.e) {
+ } else if ((@typeId(T) == TypeId.Float or @typeId(T) == TypeId.ComptimeFloat) and base == math.e) {
return math.ln(x);
}
switch (@typeId(T)) {
- TypeId.FloatLiteral => {
+ TypeId.ComptimeFloat => {
return @typeOf(1.0)(math.ln(f64(x)) / math.ln(f64(base)));
},
- TypeId.IntLiteral => {
+ TypeId.ComptimeInt => {
return @typeOf(1)(math.floor(math.ln(f64(x)) / math.ln(f64(base))));
},
builtin.TypeId.Int => {