Skip to content

Commit

Permalink
deg2rad was renamed in Godot (godotengine/godot#64367)
Browse files Browse the repository at this point in the history
  • Loading branch information
menip committed Aug 26, 2022
1 parent abd73bb commit 795e510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terrain/instancing/voxel_instance_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ float VoxelInstanceGenerator::get_offset_along_normal() const {

void VoxelInstanceGenerator::set_min_slope_degrees(float degrees) {
_min_slope_degrees = math::clamp(degrees, 0.f, 180.f);
const float max_surface_normal_y = math::min(1.f, Math::cos(Math::deg2rad(_min_slope_degrees)));
const float max_surface_normal_y = math::min(1.f, Math::cos(Math::deg_to_rad(_min_slope_degrees)));
if (max_surface_normal_y == _max_surface_normal_y) {
return;
}
Expand All @@ -550,7 +550,7 @@ float VoxelInstanceGenerator::get_min_slope_degrees() const {

void VoxelInstanceGenerator::set_max_slope_degrees(float degrees) {
_max_slope_degrees = math::clamp(degrees, 0.f, 180.f);
const float min_surface_normal_y = math::max(-1.f, Math::cos(Math::deg2rad(_max_slope_degrees)));
const float min_surface_normal_y = math::max(-1.f, Math::cos(Math::deg_to_rad(_max_slope_degrees)));
if (min_surface_normal_y == _min_surface_normal_y) {
return;
}
Expand Down

0 comments on commit 795e510

Please sign in to comment.