VS:Ang2Vec: Difference between revisions
Jump to navigation
Jump to search
m (beautify) |
(Simplify) |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
Returns a | Returns a 3-dimensional vector that is defined by the specified polar angle and length values. | ||
</desc> | </desc> | ||
Line 40: | Line 40: | ||
<remark> | <remark> | ||
([[User:CBM-c-|_c_]], 2022.01. | ([[User:CBM-c-|_c_]], 2022.01.20) The vector returned is always 3-dimensional whereby the last item is always 0: Pascal: {x, y, z}, Python: tuple (0.0, 0.0, 0.0) | ||
</remark> | </remark> | ||
Line 62: | Line 62: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<return> | <return> | ||
Returns a | Returns a 3-dimensional vector. | ||
</return> | </return> | ||
Latest revision as of 05:24, 20 January 2022
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns a 3-dimensional vector that is defined by the specified polar angle and length values.
FUNCTION Ang2Vec(
angleR :REAL;
Length :REAL) : VECTOR;
def vs.Ang2Vec(angleR, Length): return VECTOR
Parameters
angleR REAL The angle of the vector (in degrees). Length REAL The length of the vector.
Return Value
Returns a 3-dimensional vector.
Remarks
(_c_, 2022.01.20) The vector returned is always 3-dimensional whereby the last item is always 0: Pascal: {x, y, z}, Python: tuple (0.0, 0.0, 0.0)
Example
VectorScript
Message( Ang2Vec(45, 1) ); { 3-dimensional vector whose z item is always 0 }
Python
v = vs.Ang2Vec(45, 1) vs.Message( str( v ) ) # 3-dimensional tuple whose last item is always 0
Version
Availability: from All Versions