Skip to content

Commit

Permalink
Removed std namespace from sqrtf
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliom committed Jul 23, 2024
1 parent 470adbe commit 667daf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BasicRenderer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/source/*.cpp" "${PROJECT_SOURCE_DIR}/in
add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/include)

target_link_libraries(${PROJECT_NAME} PUBLIC BasicCppLibrary m)
target_link_libraries(${PROJECT_NAME} PUBLIC BasicCppLibrary)
add_dependencies(${PROJECT_NAME} BasicCppLibrary)

# ------ Google Test ----- #
Expand Down
6 changes: 3 additions & 3 deletions BasicRenderer/source/FrameBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ namespace BasicRenderer
{
// gamma correction to 2.f instead of 2.2 to avoid the extremely expensive std::powf()
Color& c = colorBuffer[i];
c.x = std::sqrtf(c.x);
c.y = std::sqrtf(c.y);
c.z = std::sqrtf(c.z);
c.x = sqrtf(c.x);
c.y = sqrtf(c.y);
c.z = sqrtf(c.z);
}
}

Expand Down

0 comments on commit 667daf8

Please sign in to comment.