[NUI] Split NUI Assemblies (#865)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Xaml / src / internal / XamlBinding / Internals / NumericExtensions.cs
1 using System;
2
3 namespace Tizen.NUI.XamlBinding.Internals
4 {
5     internal static class NumericExtensions
6     {
7
8         public static double Clamp(this double self, double min, double max)
9         {
10             return Math.Min(max, Math.Max(self, min));
11         }
12
13         public static float Clamp(this float self, float min, float max)
14         {
15             return Math.Min(max, Math.Max(self, min));
16         }
17
18         public static int Clamp(this int self, int min, int max)
19         {
20             return Math.Min(max, Math.Max(self, min));
21         }
22     }
23 }