@@ -107,26 +107,47 @@ else
107107{
108108 static import std.math ;
109109 import std.traits : isFloatingPoint;
110+ // /
110111 T sqrt (T)(in T x) if (isFloatingPoint! T) { return std.math.sqrt (x); }
112+ // /
111113 T sin (T)(in T x) if (isFloatingPoint! T) { return std.math.sin (x); }
114+ // /
112115 T cos (T)(in T x) if (isFloatingPoint! T) { return std.math.cos (x); }
116+ // /
113117 T pow (T)(in T x, in T power) if (isFloatingPoint! T) { return std.math.pow (x, power); }
118+ // /
114119 T powi (T)(in T x, int power) if (isFloatingPoint! T) { return std.math.pow (x, power); }
120+ // /
115121 T exp (T)(in T x) if (isFloatingPoint! T) { return std.math.exp (x); }
122+ // /
116123 T log (T)(in T x) if (isFloatingPoint! T) { return std.math.log (x); }
124+ // /
117125 T fabs (T)(in T x) if (isFloatingPoint! T) { return std.math.fabs (x); }
126+ // /
118127 T floor (T)(in T x) if (isFloatingPoint! T) { return std.math.floor (x); }
128+ // /
119129 T exp2 (T)(in T x) if (isFloatingPoint! T) { return std.math.exp2 (x); }
130+ // /
120131 T log10 (T)(in T x) if (isFloatingPoint! T) { return std.math.log10 (x); }
132+ // /
121133 T log2 (T)(in T x) if (isFloatingPoint! T) { return std.math.log2 (x); }
134+ // /
122135 T ceil (T)(in T x) if (isFloatingPoint! T) { return std.math.ceil (x); }
136+ // /
123137 T trunc (T)(in T x) if (isFloatingPoint! T) { return std.math.trunc (x); }
138+ // /
124139 T rint (T)(in T x) if (isFloatingPoint! T) { return std.math.rint (x); }
140+ // /
125141 T nearbyint (T)(in T x) if (isFloatingPoint! T) { return std.math.nearbyint (x); }
142+ // /
126143 T copysign (T)(in T mag, in T sgn) if (isFloatingPoint! T) { return std.math.copysign (mag, sgn); }
144+ // /
127145 T round (T)(in T x) if (isFloatingPoint! T) { return std.math.round (x); }
146+ // /
128147 T fmuladd (T)(in T a, in T b, in T c) if (isFloatingPoint! T) { return a * b + c; }
129148 unittest { assert (fmuladd! double (2 , 3 , 4 ) == 2 * 3 + 4 ); }
149+ // /
130150 T fmin (T)(in T x, in T y) if (isFloatingPoint! T) { return std.math.fmin (x, y); }
151+ // /
131152 T fmax (T)(in T x, in T y) if (isFloatingPoint! T) { return std.math.fmax (x, y); }
132153}
0 commit comments