Skip to content

Commit

Permalink
I hate Visual Studio.
Browse files Browse the repository at this point in the history
- Somebody had to think it wasn't a good idea to include an implementation of isnan in std.
- Speaking of Visual Studio, removed the VS2013 files, since VS2013 is no longer supported.
  • Loading branch information
Espyo committed Aug 15, 2020
1 parent 28be4eb commit 74201e0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1,257 deletions.
9 changes: 7 additions & 2 deletions Source/source/editors/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ void editor::transformation_widget::draw(
get_locations(center, size, angle, handles, &radius, NULL);

//Draw the rotation handle.
if(angle && !std::isnan(radius)) {
if(angle && radius >= 0.0f) {
al_draw_circle(
center->x, center->y, radius,
al_map_rgb(64, 64, 192), ROTATION_HANDLE_THICKNESS * zoom
Expand Down Expand Up @@ -1672,7 +1672,12 @@ void editor::transformation_widget::get_locations(
);
}

*radius = dist(point(), size_to_use).to_float() / 2.0f;
float diameter = dist(point(), size_to_use).to_float();
if(diameter == 0.0f) {
*radius = 0.0f;
} else {
*radius = diameter / 2.0f;
}

if(transform) *transform = transform_to_use;
}
Expand Down
22 changes: 0 additions & 22 deletions Source/visual_studio_2013/Pikifen.sln

This file was deleted.

Loading

0 comments on commit 74201e0

Please sign in to comment.