Skip to content

Commit 6211d25

Browse files
authored
Fix Max44009 build with obsolete Math.Pow usage (#175)
1 parent 04ac94c commit 6211d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

devices/Max44009/Max44009.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private double GetIlluminance()
8585
byte exponent = (byte)((readBuff[0] & 0b_1111_0000) >> 4);
8686
byte mantissa = (byte)(((readBuff[0] & 0b_0000_1111) << 4) | (readBuff[1]) & 0b_0000_1111);
8787

88-
double lux = Math.Pow(2, exponent) * mantissa * 0.045;
88+
double lux = Math.Pow(2.0, exponent) * mantissa * 0.045;
8989

9090
return Math.Round(lux * 1000) / 1000.0;
9191
}

0 commit comments

Comments
 (0)