Skip to content

Commit

Permalink
[php7] fixed Math.min() and Math.max() for NAN on PHP 7.1.9 and 7…
Browse files Browse the repository at this point in the history
….1.10
  • Loading branch information
RealyUniqueName committed Jan 31, 2018
1 parent a99312d commit 666f17e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
php7 : fixed appending "sqlite:" prefix to the names of files created by `sys.db.Sqlite.open()` (#6692)
php7 : made php.Lib.objectOfAssociativeArray() recursive (#6698)
php7 : fixed php error on parsing expressions like `a == b == c` (#6720)
php7 : fixed `Math.min()` and `Math.max()` for NAN on PHP 7.1.9 and 7.1.10
php/php7 : fixed `sys.net.Socket.bind()` (#6693)

2017-10-08: 3.4.4
Expand Down
4 changes: 2 additions & 2 deletions std/php7/_std/Math.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import php.Syntax.*;
public static var NEGATIVE_INFINITY(default,null) : Float = -Const.INF;

public static inline function abs( v:Float ) : Float return Global.abs(v);
public static inline function min( a:Float, b:Float ) : Float return isNaN(a) ? NaN : Global.min(a, b);
public static inline function max( a:Float, b:Float ) : Float return isNaN(b) ? NaN : Global.max(a, b);
public static inline function min( a:Float, b:Float ) : Float return isNaN(a) || isNaN(b) ? NaN : Global.min(a, b);
public static inline function max( a:Float, b:Float ) : Float return isNaN(a) || isNaN(b) ? NaN : Global.max(a, b);
public static inline function sin( v:Float ) : Float return Global.sin(v);
public static inline function cos( v:Float ) : Float return Global.cos(v);
public static inline function atan2( y:Float, x:Float ) : Float return Global.atan2(y, x);
Expand Down

0 comments on commit 666f17e

Please sign in to comment.