math.pow → ^

This commit is contained in:
Starbeamrainbowlabs 2022-09-18 16:30:27 +01:00
parent 52d24a63f3
commit 4a6cb2551c
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ function worldeditadditions.conv.kernel_gaussian(dimension, sigma)
-- http://en.wikipedia.org/w/index.php?title=Gaussian_blur&oldid=608793634#Mechanics
local gaussian = (1 / math.sqrt(
math.pi * two_sigma_square
)) * math.exp((-1) * (math.pow(distance, 2) / two_sigma_square));
)) * math.exp((-1) * ((distance ^ 2) / two_sigma_square));
sum = sum + gaussian
kernel[i*dimension + j] = gaussian