Is there an exponent operator in C#?

后端 未结 8 1587
萌比男神i
萌比男神i 2020-11-28 08:09

For example, does an operator exist to handle this?

float Result, Number1, Number2;

Number1 = 2;
Number2 = 2;

Result = Number1 (operator) Number2;
<         


        
8条回答
  •  难免孤独
    2020-11-28 09:04

    I stumbled on this post looking to use scientific notation in my code, I used

    4.95*Math.Pow(10,-10);
    

    But afterwards I found out you can do

    4.95E-10;
    

    Just thought I would add this for anyone in a similar situation that I was in.

提交回复
热议问题