Skip to content

Commit

Permalink
brutal: fix deg2rad / rad2deg functions
Browse files Browse the repository at this point in the history
- I don't know why nor how it our code worked before
  • Loading branch information
Supercip971 committed Mar 26, 2022
1 parent 6560d29 commit caba603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/libs/brutal/math/angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ static inline MRadian m_rad(float value)

static inline MRadian m_deg2rad(MDegree deg)
{
return (MRadian){(deg.v) * 180 / M_PI};
return (MRadian){(deg.v) * (M_PI / 180.f)};
}

static inline MDegree m_rad2deg(MRadian rad)
{
return (MDegree){(rad.v) * M_PI / 180};
return (MDegree){(rad.v) * (180.f / M_PI)};
}

0 comments on commit caba603

Please sign in to comment.