fixed comments
parent
395f3d946a
commit
c7799ff2b2
|
@ -1,7 +1,7 @@
|
||||||
// Special Cases:
|
// Special Cases:
|
||||||
//
|
//
|
||||||
// powi(x, +-0) = 1 for any x
|
// powi(x, +-0) = 1 for any x
|
||||||
// powi(0, y) = 1 for any y
|
// powi(0, y) = 0 for any y
|
||||||
// powi(1, y) = 1 for any y
|
// powi(1, y) = 1 for any y
|
||||||
// powi(-1, y) = -1 for for y an odd integer
|
// powi(-1, y) = -1 for for y an odd integer
|
||||||
// powi(-1, y) = 1 for for y an even integer
|
// powi(-1, y) = 1 for for y an even integer
|
||||||
|
@ -29,7 +29,7 @@ pub fn powi(comptime T: type, x: T, y: T) (error.{
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (x) {
|
switch (x) {
|
||||||
// powi(0, y) = 1 for any y
|
// powi(0, y) = 0 for any y
|
||||||
0 => return 0,
|
0 => return 0,
|
||||||
|
|
||||||
// powi(1, y) = 1 for any y
|
// powi(1, y) = 1 for any y
|
||||||
|
|
Loading…
Reference in New Issue