কম্পিউটার টিউটোরিয়াল

C# MathF.Cosh() মেথড উদাহরণসহ

C#-এ MathF.Cosh() মেথডটি নির্দিষ্ট ফ্লোটিং-পয়েন্ট মানের হাইপারবোলিক কোসাইন (hyperbolic cosine) রিটার্ন করে।

সিনট্যাক্স

public static float Cosh (float val);

উদাহরণ ১

using System;

class Demo {
    public static void Main(){
        float val = 45.0f;
        float res = MathF.Cosh(val);
        Console.WriteLine("Cosh = " + res);
    }
}

আউটপুট

Cosh = 1.746714E+19

উদাহরণ ২

বড় ইনপুটের জন্য Infinity রিটার্ন করে।

using System;

class Demo {
    public static void Main(){
        float val = 90f;
        float res = MathF.Cosh(val);
        Console.WriteLine("Cosh = " + res);
    }
}

আউটপুট

Cosh = Infinity
  1. C#-এ MathF.Sin() মেথড: ফ্লোট সাইন ফাংশন ব্যবহার

  2. C#-এ MathF.Truncate() মেথড উদাহরণসহ

  3. C#-এ MathF.Tanh() মেথড উদাহরণসহ

  4. C#-এ MathF.Tan() মেথড উদাহরণসহ