math.min: Drop useless second isFloatingPoint check
This commit is contained in:
parent
10022d158c
commit
ac317aa9d6
@ -15,7 +15,7 @@
|
|||||||
module tanya.math.mp;
|
module tanya.math.mp;
|
||||||
|
|
||||||
import std.algorithm.comparison;
|
import std.algorithm.comparison;
|
||||||
import std.algorithm.mutation : fill, copy, reverse;
|
import std.algorithm.mutation : copy, fill, reverse;
|
||||||
import std.range;
|
import std.range;
|
||||||
import tanya.algorithm.mutation;
|
import tanya.algorithm.mutation;
|
||||||
import tanya.container.array;
|
import tanya.container.array;
|
||||||
|
@ -768,7 +768,7 @@ if (isIntegral!T)
|
|||||||
|
|
||||||
/// ditto
|
/// ditto
|
||||||
T min(T)(T x, T y)
|
T min(T)(T x, T y)
|
||||||
if (isFloatingPoint!T && isFloatingPoint!T)
|
if (isFloatingPoint!T)
|
||||||
{
|
{
|
||||||
if (isNaN(x))
|
if (isNaN(x))
|
||||||
{
|
{
|
||||||
@ -838,7 +838,7 @@ if (isIntegral!T)
|
|||||||
|
|
||||||
/// ditto
|
/// ditto
|
||||||
T max(T)(T x, T y)
|
T max(T)(T x, T y)
|
||||||
if (isFloatingPoint!T && isFloatingPoint!T)
|
if (isFloatingPoint!T)
|
||||||
{
|
{
|
||||||
if (isNaN(x))
|
if (isNaN(x))
|
||||||
{
|
{
|
||||||
|
@ -611,7 +611,7 @@ body
|
|||||||
|
|
||||||
@nogc @system unittest
|
@nogc @system unittest
|
||||||
{
|
{
|
||||||
static bool destroyed = false;
|
static bool destroyed;
|
||||||
|
|
||||||
static struct F
|
static struct F
|
||||||
{
|
{
|
||||||
@ -812,7 +812,7 @@ struct Unique(T)
|
|||||||
///
|
///
|
||||||
@nogc nothrow @system unittest
|
@nogc nothrow @system unittest
|
||||||
{
|
{
|
||||||
static bool destroyed = false;
|
static bool destroyed;
|
||||||
|
|
||||||
static struct F
|
static struct F
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user