Skip to content

Commit

Permalink
refactor: datatype module (#795)
Browse files Browse the repository at this point in the history
- float to double typecast to comply with clang-tidy

Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
  • Loading branch information
00thirdeye00 committed Jul 10, 2024
1 parent f36227a commit f67743e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/datatype/Datatype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ bool boolean(double probability)
{
double prob = probability;

if (prob <= 0.)
if (prob <= double(0.))
{
return false;
}

if (prob >= 1.)
if (prob >= double(1.))
{
return true;
}

return number::decimal(0., 1.) < prob;
return double(number::decimal(0., 1.)) < prob;
}

return number::decimal(0., 1.) < 0.5;
Expand Down

0 comments on commit f67743e

Please sign in to comment.