mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed: Undefined negative double to unsigned int conversion in FNodeBuilder::PointToAngle.
This commit is contained in:
parent
b63eb391f7
commit
d94aaf1fcf
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ angle_t FNodeBuilder::PointToAngle (fixed_t x, fixed_t y)
|
|||
#else // !__APPLE__ || __llvm__
|
||||
double ang = atan2 (double(y), double(x));
|
||||
#endif // __APPLE__ && !__llvm__
|
||||
return angle_t(ang * rad2bam) << 1;
|
||||
// Convert to signed first since negative double to unsigned is undefined.
|
||||
return angle_t(int(ang * rad2bam)) << 1;
|
||||
}
|
||||
|
||||
void FNodeBuilder::FindUsedVertices (vertex_t *oldverts, int max)
|
||||
|
|
Loading…
Reference in a new issue