float a = 2f; // cathetus maggiore
float b = 2f; // smaller cathetus
float angle; // result in degree
angle = Mathf.Atan( b / a); // result from 0 to 1.570796...
angle = angle * Mathf.Rad2Deg; // convert it to degree
print(angle.ToString()); // 45°
atan2(b,a) would also technically work… because a right triangle guarantees that you’d have angles less than 90. But is technically overkill since it also calculate direction, and would result in odd values if you say passed in negative side lengths.