From 9602f698989ed775b2d244f3396a736d94b48c40 Mon Sep 17 00:00:00 2001 From: Nobuyuki Date: Mon, 3 Jun 2024 10:27:49 +0900 Subject: [PATCH] small --- task07/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task07/main.cpp b/task07/main.cpp index 5d80e49..2611933 100644 --- a/task07/main.cpp +++ b/task07/main.cpp @@ -156,7 +156,7 @@ class Sphere { if (ratio_specular <= 0.f && ratio_diffuse <= 0.f) { return 0.f; } const Eigen::Vector3f dir_mirror = dir_in - 2.f * dir_in.dot(dir_nrm) * dir_nrm; float cos_alpha = dir_mirror.dot(dir_out); - float brdf_specular = std::powf(cos_alpha, shiness) * (shiness + 1.f) / (2.f * float(M_PI)); + float brdf_specular = std::pow(cos_alpha, shiness) * (shiness + 1.f) / (2.f * float(M_PI)); float brdf_diffuse = 1.f / float(M_PI); return brdf_specular * ratio_specular + brdf_diffuse * ratio_diffuse; }