C#中是否有指數運算符? - Is there an exponent operator in C#?

問題:

For example, does an operator exist to handle this?例如,是否存在運營商來處理這個問題?

float Result, Number1, Number2;

Number1 = 2;
Number2 = 2;

Result = Number1 (operator) Number2;

In the past the ^ operator has served as an exponential operator in other languages, but in C# it is a bit-wise operator.過去, ^運算符在其他語言中用作指數運算符,但在 C# 中它是按位運算符。

Do I have to write a loop or include another namespace to handle exponential operations?我是否必須編寫一個循環或包含另一個命名空間來處理指數運算? If so, how do I handle exponential operations using non-integers?如果是這樣,我如何使用非整數處理指數運算?


解決方案:

參考一: https://stackoom.com/question/CjRE
參考二: Is there an exponent operator in C#?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章