188 references to MathF
Microsoft.Bcl.Numerics (1)
Microsoft.Bcl.Numerics.Forwards.cs (1)
4
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MathF
))]
Microsoft.Maui.Essentials (5)
Compass\LowPassFilter.shared.cs (5)
16
sin +=
MathF
.Sin(radians);
18
cos +=
MathF
.Cos(radians);
26
sin -=
MathF
.Sin(old);
28
cos -=
MathF
.Cos(old);
36
return
MathF
.Atan2(sin / size, cos / size);
Microsoft.Maui.Graphics (52)
GeometryUtil.cs (15)
14
return
MathF
.Sqrt(a * a + b * b);
22
var radians =
MathF
.Atan2(dy, dx);
23
var degrees = radians * 180.0f /
MathF
.PI;
30
return
MathF
.PI * angle / 180;
40
return angle * (180 /
MathF
.PI);
52
var x =
MathF
.Cos(radians) * point.X -
MathF
.Sin(radians) * point.Y;
53
var y =
MathF
.Sin(radians) * point.X +
MathF
.Cos(radians) * point.Y;
61
var x = center.X +
MathF
.Cos(radians) * (point.X - center.X) -
MathF
.Sin(radians) * (point.Y - center.Y);
62
var y = center.Y +
MathF
.Sin(radians) * (point.X - center.X) +
MathF
.Cos(radians) * (point.Y - center.Y);
94
var sin =
MathF
.Sin(angleInRadians);
95
var cos =
MathF
.Cos(angleInRadians);
Matrix3x2Extensions.cs (7)
62
return
MathF
.Atan2(matrix.M12, matrix.M11);
144
var areaScale =
MathF
.Abs(determinant);
145
return
MathF
.Sqrt(areaScale);
166
scale =
MathF
.Sqrt(
MathF
.Abs(det));
167
scalex = value.M12 == 0 ?
MathF
.Abs(value.M11) : new Vector2(value.M11, value.M12).Length();
168
scaley = value.M21 == 0 ?
MathF
.Abs(value.M22) : new Vector2(value.M21, value.M22).Length();
PathArcExtensions.cs (21)
28
float cosAngle =
MathF
.Cos(angle);
29
float sinAngle =
MathF
.Sin(angle);
36
rx =
MathF
.Abs(rx);
37
ry =
MathF
.Abs(ry);
47
rx =
MathF
.Sqrt(radiiCheck) * rx;
48
ry =
MathF
.Sqrt(radiiCheck) * ry;
57
float coef = sign *
MathF
.Sqrt(sq);
74
float n =
MathF
.Sqrt(ux * ux + uy * uy);
79
float angleStart = GeometryUtil.RadiansToDegrees(sign *
MathF
.Acos(p / n));
82
n =
MathF
.Sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
85
float angleExtent = GeometryUtil.RadiansToDegrees(sign *
MathF
.Acos(p / n));
109
if (
MathF
.Abs(arc) > 360)
116
float segs =
MathF
.Ceiling(
MathF
.Abs(arc) / 45);
128
float sinbeta =
MathF
.Sin(beta);
129
float cosbeta =
MathF
.Cos(beta);
136
float sinangle =
MathF
.Sin(angle - theta / 2);
137
float cosangle =
MathF
.Cos(angle - theta / 2);
139
float div =
MathF
.Cos(theta / 2);
145
sinangle =
MathF
.Sin(angle);
146
cosangle =
MathF
.Cos(angle);
PointF.cs (5)
79
return new PointF(
MathF
.Round(X),
MathF
.Round(Y));
116
return
MathF
.Sqrt(
MathF
.Pow(X - other.X, 2) +
MathF
.Pow(Y - other.Y, 2));
RectF.cs (4)
210
return new RectF(
MathF
.Round(X),
MathF
.Round(Y),
MathF
.Round(Width),
MathF
.Round(Height));
Microsoft.Maui.Graphics.Skia (4)
SKGraphicsExtensions.cs (2)
71
return new RectF(target.Left, target.Top,
MathF
.Abs(target.Right - target.Left),
MathF
.Abs(target.Bottom - target.Top));
SkiaImage.cs (2)
149
canvas.DrawImage(this, dirtyRect.Left, dirtyRect.Top,
MathF
.Round(dirtyRect.Width),
MathF
.Round(dirtyRect.Height));
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
src\Graphics\src\Graphics\Platforms\Windows\GraphicsExtensions.cs (2)
203
var absRotation =
MathF
.Abs(rotation);
331
var absRotation =
MathF
.Abs(rotation);
mscorlib (1)
mscorlib.cs (1)
24
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MathF
))]
netstandard (1)
netstandard.cs (1)
1050
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MathF
))]
System.Numerics.Tensors (12)
System\Numerics\Tensors\TensorPrimitives.Single.cs (12)
136
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Cosh(<paramref name="x" />[i])</c>.
143
/// The angles in x must be in radians. Use <see cref="M:System.Single.DegreesToRadians(System.Single)"/> or multiply by <see cref="
MathF
.PI"/>/180 to convert degrees to radians.
206
return
MathF
.Sqrt(Aggregate<SubtractSquaredOperator_Single, AddOperator_Single>(x, y));
278
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Exp(<paramref name="x" />[i])</c>.
365
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Log(<paramref name="x" />[i])</c>.
388
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Log2(<paramref name="x" />[i])</c>.
696
MathF
.Sqrt(SumOfSquares(x));
791
/// This method effectively computes <c><paramref name="destination" />[i] = 1f / (1f + <see cref="
MathF
" />.Exp(-<paramref name="x" />[i]))</c>.
815
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Sinh(<paramref name="x" />[i])</c>.
822
/// The angles in x must be in radians. Use <see cref="M:System.Single.DegreesToRadians(System.Single)"/> or multiply by <see cref="
MathF
.PI"/>/180 to convert degrees to radians.
967
/// This method effectively computes <c><paramref name="destination" />[i] = <see cref="
MathF
" />.Tanh(<paramref name="x" />[i])</c>.
975
/// The angles in x must be in radians. Use <see cref="M:System.Single.DegreesToRadians(System.Single)"/> or multiply by <see cref="
MathF
.PI"/>/180 to convert degrees to radians.
System.Private.CoreLib (108)
src\libraries\System.Private.CoreLib\src\System\Half.cs (36)
1237
public static Half Log2(Half value) => (Half)
MathF
.Log2((float)value);
1291
public static Half Exp(Half x) => (Half)
MathF
.Exp((float)x);
1313
public static Half Ceiling(Half x) => (Half)
MathF
.Ceiling((float)x);
1324
public static Half Floor(Half x) => (Half)
MathF
.Floor((float)x);
1327
public static Half Round(Half x) => (Half)
MathF
.Round((float)x);
1330
public static Half Round(Half x, int digits) => (Half)
MathF
.Round((float)x, digits);
1333
public static Half Round(Half x, MidpointRounding mode) => (Half)
MathF
.Round((float)x, mode);
1336
public static Half Round(Half x, int digits, MidpointRounding mode) => (Half)
MathF
.Round((float)x, digits, mode);
1339
public static Half Truncate(Half x) => (Half)
MathF
.Truncate((float)x);
1440
public static Half Atan2(Half y, Half x) => (Half)
MathF
.Atan2((float)y, (float)x);
1512
public static Half FusedMultiplyAdd(Half left, Half right, Half addend) => (Half)
MathF
.FusedMultiplyAdd((float)left, (float)right, (float)addend);
1515
public static Half Ieee754Remainder(Half left, Half right) => (Half)
MathF
.IEEERemainder((float)left, (float)right);
1549
public static Half ReciprocalEstimate(Half x) => (Half)
MathF
.ReciprocalEstimate((float)x);
1552
public static Half ReciprocalSqrtEstimate(Half x) => (Half)
MathF
.ReciprocalSqrtEstimate((float)x);
1555
public static Half ScaleB(Half x, int n) => (Half)
MathF
.ScaleB((float)x, n);
1565
public static Half Acosh(Half x) => (Half)
MathF
.Acosh((float)x);
1568
public static Half Asinh(Half x) => (Half)
MathF
.Asinh((float)x);
1571
public static Half Atanh(Half x) => (Half)
MathF
.Atanh((float)x);
1574
public static Half Cosh(Half x) => (Half)
MathF
.Cosh((float)x);
1577
public static Half Sinh(Half x) => (Half)
MathF
.Sinh((float)x);
1580
public static Half Tanh(Half x) => (Half)
MathF
.Tanh((float)x);
1599
public static Half Log(Half x) => (Half)
MathF
.Log((float)x);
1602
public static Half Log(Half x, Half newBase) => (Half)
MathF
.Log((float)x, (float)newBase);
1605
public static Half Log10(Half x) => (Half)
MathF
.Log10((float)x);
1852
public static Half MaxMagnitude(Half x, Half y) => (Half)
MathF
.MaxMagnitude((float)x, (float)y);
1880
public static Half MinMagnitude(Half x, Half y) => (Half)
MathF
.MinMagnitude((float)x, (float)y);
2171
public static Half Pow(Half x, Half y) => (Half)
MathF
.Pow((float)x, (float)y);
2178
public static Half Cbrt(Half x) => (Half)
MathF
.Cbrt((float)x);
2187
public static Half Sqrt(Half x) => (Half)
MathF
.Sqrt((float)x);
2218
public static Half Acos(Half x) => (Half)
MathF
.Acos((float)x);
2224
public static Half Asin(Half x) => (Half)
MathF
.Asin((float)x);
2230
public static Half Atan(Half x) => (Half)
MathF
.Atan((float)x);
2236
public static Half Cos(Half x) => (Half)
MathF
.Cos((float)x);
2260
public static Half Sin(Half x) => (Half)
MathF
.Sin((float)x);
2265
var (sin, cos) =
MathF
.SinCos((float)x);
2280
public static Half Tan(Half x) => (Half)
MathF
.Tan((float)x);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (9)
270
return (T)(object)
MathF
.Ceiling((float)(object)value);
582
return (T)(object)
MathF
.Floor((float)(object)value);
1271
return (T)(object)
MathF
.Round((float)(object)value);
1471
return (T)(object)(byte)
MathF
.Sqrt((byte)(object)value);
1479
return (T)(object)(short)
MathF
.Sqrt((short)(object)value);
1499
return (T)(object)(sbyte)
MathF
.Sqrt((sbyte)(object)value);
1503
return (T)(object)(float)
MathF
.Sqrt((float)(object)value);
1507
return (T)(object)(ushort)
MathF
.Sqrt((ushort)(object)value);
1591
return (T)(object)
MathF
.Truncate((float)(object)value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (2)
315
/// <seealso cref="
MathF
.Ceiling(float)" />
1617
/// <seealso cref="
MathF
.Floor(float)" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
353
/// <seealso cref="
MathF
.Ceiling(float)" />
1708
/// <seealso cref="
MathF
.Floor(float)" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (2)
353
/// <seealso cref="
MathF
.Ceiling(float)" />
1757
/// <seealso cref="
MathF
.Floor(float)" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (2)
321
/// <seealso cref="
MathF
.Ceiling(float)" />
1493
/// <seealso cref="
MathF
.Floor(float)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (55)
67
public const float E =
MathF
.E;
71
public const float Pi =
MathF
.PI;
75
public const float Tau =
MathF
.Tau;
574
public static float Log2(float value) =>
MathF
.Log2(value);
628
public static float Exp(float x) =>
MathF
.Exp(x);
631
public static float ExpM1(float x) =>
MathF
.Exp(x) - 1;
634
public static float Exp2(float x) =>
MathF
.Pow(2, x);
637
public static float Exp2M1(float x) =>
MathF
.Pow(2, x) - 1;
640
public static float Exp10(float x) =>
MathF
.Pow(10, x);
643
public static float Exp10M1(float x) =>
MathF
.Pow(10, x) - 1;
651
public static float Ceiling(float x) =>
MathF
.Ceiling(x);
674
public static float Floor(float x) =>
MathF
.Floor(x);
678
public static float Round(float x) =>
MathF
.Round(x);
681
public static float Round(float x, int digits) =>
MathF
.Round(x, digits);
684
public static float Round(float x, MidpointRounding mode) =>
MathF
.Round(x, mode);
687
public static float Round(float x, int digits, MidpointRounding mode) =>
MathF
.Round(x, digits, mode);
691
public static float Truncate(float x) =>
MathF
.Truncate(x);
805
public static float Atan2(float y, float x) =>
MathF
.Atan2(y, x);
811
public static float BitDecrement(float x) =>
MathF
.BitDecrement(x);
814
public static float BitIncrement(float x) =>
MathF
.BitIncrement(x);
818
public static float FusedMultiplyAdd(float left, float right, float addend) =>
MathF
.FusedMultiplyAdd(left, right, addend);
821
public static float Ieee754Remainder(float left, float right) =>
MathF
.IEEERemainder(left, right);
824
public static int ILogB(float x) =>
MathF
.ILogB(x);
831
public static float ReciprocalEstimate(float x) =>
MathF
.ReciprocalEstimate(x);
835
public static float ReciprocalSqrtEstimate(float x) =>
MathF
.ReciprocalSqrtEstimate(x);
838
public static float ScaleB(float x, int n) =>
MathF
.ScaleB(x, n);
849
public static float Acosh(float x) =>
MathF
.Acosh(x);
853
public static float Asinh(float x) =>
MathF
.Asinh(x);
857
public static float Atanh(float x) =>
MathF
.Atanh(x);
861
public static float Cosh(float x) =>
MathF
.Cosh(x);
865
public static float Sinh(float x) =>
MathF
.Sinh(x);
869
public static float Tanh(float x) =>
MathF
.Tanh(x);
884
public static float Log(float x) =>
MathF
.Log(x);
887
public static float Log(float x, float newBase) =>
MathF
.Log(x, newBase);
890
public static float LogP1(float x) =>
MathF
.Log(x + 1);
894
public static float Log10(float x) =>
MathF
.Log10(x);
897
public static float Log2P1(float x) =>
MathF
.Log2(x + 1);
900
public static float Log10P1(float x) =>
MathF
.Log10(x + 1);
958
public static float CopySign(float value, float sign) =>
MathF
.CopySign(value, sign);
962
public static float Max(float x, float y) =>
MathF
.Max(x, y);
993
public static float Min(float x, float y) =>
MathF
.Min(x, y);
1023
public static int Sign(float value) =>
MathF
.Sign(value);
1040
public static float Abs(float value) =>
MathF
.Abs(value);
1156
public static float MaxMagnitude(float x, float y) =>
MathF
.MaxMagnitude(x, y);
1186
public static float MinMagnitude(float x, float y) =>
MathF
.MinMagnitude(x, y);
1496
public static float Pow(float x, float y) =>
MathF
.Pow(x, y);
1504
public static float Cbrt(float x) =>
MathF
.Cbrt(x);
1685
public static float Sqrt(float x) =>
MathF
.Sqrt(x);
1717
public static float Acos(float x) =>
MathF
.Acos(x);
1727
public static float Asin(float x) =>
MathF
.Asin(x);
1737
public static float Atan(float x) =>
MathF
.Atan(x);
1747
public static float Cos(float x) =>
MathF
.Cos(x);
1858
public static float Sin(float x) =>
MathF
.Sin(x);
1861
public static (float Sin, float Cos) SinCos(float x) =>
MathF
.SinCos(x);
2066
public static float Tan(float x) =>
MathF
.Tan(x);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
347
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MathF
))]
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
22
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MathF
))]