Die Bibliothek (System) bietet dazu die Funktionen der Math-Klasse an.
Die Ergebnisse sind vom Typ double und müssen deshalb konvertiert werden
using
System;
float a, b, c, temp, alpha;
a = 10;
b = 10;
temp = a * a + b * b;
c = (
float)Math.Sqrt(temp);
alpha = (
float)Math.Acos(b/c); // Bogenmaá
alpha = (180/(
float)Math.PI) * alpha; // Grad