About 223,000 results
Open links in new tab
  1. c# - System.Math un identified - Stack Overflow

    Math is a static class, not a namespace. It is located in the System namespace. Therefore, you only have to include the System namespace. Simply use Math.Sqrt and drop the "using System.Math;" …

  2. Math operations using System.Decimal in C# - Stack Overflow

    I am trying to use System.Decimal, but it does not work with System.Math Well for arithmatic, use Decimal, and when you need to do System.Math.Log, cast it to Double and then back again. @Storm …

  3. c# - Method that returns greater value of two numbers - Stack Overflow

    So I have this code static void Main(string[] args) { Console.Write("First Number = "); int first = int.Parse(Console.ReadLine()); Console.Write("Second Number = ")...

  4. Math.Clamp is not working in C# .NET (Windows Forms application)

    Aug 4, 2023 · Math.Clamp is not working in C# .NET (Windows Forms application) Asked 2 years, 4 months ago Modified 2 years, 3 months ago Viewed 2k times

  5. c# - How do you extend (or CAN you extend) the static Math methods ...

    Sep 15, 2016 · 14 With C# 3.0, I know you can extend methods using the 'this' nomenclature. I'm trying to extend Math.Cos (double radians) to include my new class. I know that I can just create a "Cos" …

  6. How do I use the C#6 "Using static" feature? - Stack Overflow

    Aug 6, 2015 · I'm having a look at a couple of the new features in C# 6, specifically, "using static". using static is a new kind of using clause that lets you import static members of types directly into sco...

  7. c# - Using the Math.Pow function - Stack Overflow

    Nov 29, 2013 · I have a constructor that returns the result of two ints with a 'to the power of' operator. I am trying to use the math.pow method to do this but im not to sure how it work. Here is my constructor

  8. c# - Can "System.Math.Cos" return a (float)? - Stack Overflow

    Mar 22, 2015 · 18 In C# it bugs me how there is no "Math.Cos" function that returns a float. A double is the only value you can get back thus forcing you to cast it to a float. Like so: float val = …

  9. c# - Namespace System.Math gets overshadowed after adding a …

    Mar 24, 2021 · After adding this reference, however, Math is no longer recognized as a System.Math, but is hidden by the newly added namespace - Math. expects only Math.Native as the correct …

  10. C# math library (System.Numerics vs Math.NET) - Stack Overflow

    Might be a case of speed vs precision. Sometimes math calculations in games can get away with certain approximations, like in case of classic Fast Inverse Square Root calculation , rather than traditionally …