当前位置:网站首页>Unity C trigonometric function, right triangle corner calculation
Unity C trigonometric function, right triangle corner calculation
2022-06-30 05:08:00 【zjh_ three hundred and sixty-eight】
right triangle

1、 right triangle , Two right angle sides are known ab, Find the chord length c.
ps:Mathf.Pow() Function to the power ,Mathf.Sqrt() Is the square root
// According to Pythagorean Theorem (a²+b²=c²) Find the length of the support rod , open c The square root of the string gets the length of the string
float c = Mathf.Sqrt(Mathf.Pow(a, 2) + Mathf.Pow(b, 2));2、 right triangle , Known side length , Find the angle .
ps:Mathf.Asin() Is a sine function sin,Mathf.Tan() Is a tangent function tan
// Angle ∠β angle = sin(a/c)/π*180, namely angle = radian /π*180
float β = Mathf.Asin(a / c) / Mathf.PI * 180;
// Tangent function tan seek Angle ∠α = Opposite side b Divide by adjacent edge a
float α = b / a;
// Angle ∠α = 90 - ∠β. right triangle , The sum of the two angles equals 90°
float α = 90 - β;The formula relationship between angle and radian :
angle = radian / π * 180
radian = angle / 180 * π
3、 right triangle , A right angle edge is known a, And angle ∠α, Seeking side length b
// Side length b = Angle ∠α Multiply by adjacent edges a
float b = α * a;
边栏推荐
- Force buckle 977 Square of ordered array
- Database base (Study & review for self use)
- C # equipment synthesis
- Connect() and disconnect() of socket in C #
- svg和canvas的区别
- 炒美原油的国际交易平台如何能保障资金安全呢?
- Unity ontriggerenter does not call
- ParticleSystem in the official Manual of unity_ Collision module
- Chapter 9 of OpenGL super classic (version 7): fragment processing and frame buffering
- Tcp/ip protocol details Volume I (Reading Guide)
猜你喜欢

Unity script life cycle and execution sequence

Procedural animation -- inverse kinematics of tentacles

Unity packaging failure solution

力扣589:N 叉树的前序遍历

力扣704. 二分查找

Yolov5 torch installation

Win10 vs2015 compiling curaengine

Unity3d realizes Google Digital Earth

Unity3d lookat parameter description

力扣2049:统计最高分的节点数目
随机推荐
2021-03-16
Create a simple battle game with photon pun
Unity + hololens publishing settings
Postman 做测试的 6 个常见问题
Steamvr causes abnormal scene camera
力扣周赛293题解
Chapter 9 of OpenGL super classic (version 7): fragment processing and frame buffering
PWN Introduction (2) stack overflow Foundation
中文版PyCharm改为英文版PyCharm
Initial environment configuration of the list of OpenGL super classic (version 7) vs2019
[vcs+verdi joint simulation] ~ take the counter as an example
Generate a slice of mesh Foundation
力扣349. 两个数组的交集
JPA复合主键使用
The file has been downloaded incorrectly!
Chapter 11 advanced data management of OpenGL super classic (version 7)
How to install win7 on AMD Ruilong CPU A320 series motherboard
Win10 vs2015 compiling curaengine
On mask culling of unity
Malignant bug: 1252 of unit MySQL export