为了账号安全,请及时绑定邮箱和手机立即绑定

C#中如何开根号

C#中如何开根号

C#
慕桂英3389331 2018-11-27 05:05:44
C#中如何开根号
查看完整描述

1 回答

?
青春有我

TA贡献1784条经验 获得超8个赞

c#中使用开平方函数
line=System.Math.Sqrt((ending.x-starting.x)*(ending.x-starting.x)+(ending.y-starting.y)*(ending.y-starting.y));
具体方式:
Console.WriteLine(Math.Sqrt(2.0)); //1.4142135623731
Console.WriteLine(Math.Pow(2, 2)); //4
Console.WriteLine(Math.Pow(9, 0.5)); //3
Console.WriteLine(Math.Pow(125, (1.0/3.0))); //5

查看完整回答
反对 回复 2018-12-16
  • 1 回答
  • 0 关注
  • 3630 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号