在visual studio中编写VB程序时sin cos为何不识别,如何才能输入三角函数?

2025-02-24 05:29:27
推荐回答(2个)
回答1:

vb.net提供了许多命名空间,三角函数在 System.Math 命名里:

在代码窗口的最上面添加如下代码:

Imports System.Math

见下图:

回答2:

直接用rotx函数,
【Syntax】
R = rotx(ang)

【Description】
R =
rotx(ang) creates a 3-by-3 matrix used to rotated a 3-by-1 vector or
3-by-N matrix of vectors around the x-axis by ang degrees. When acting
on a matrix, each column of the matrix represents a different vector.
For the rotation matrix R and vector v, the rotated vector is given
by R*v.