Vector3int16
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Loại dữ liệu Vector3int16 đại diện cho một véctor trong không gian 3D với một signed 16-bit integer cho các bộ phận của nó. Nó tương tự như Vector3 trong việc cho phép các hoạt động arithmetic tương tự, nhưng nó
Vector3int16 nên không nên lẫn lộn với:
- Vector3 , a more precise and complete implementation for 3D véctor.
- Vector2int16 , một thực hiện tương tự cho 2D véctor.
Đối với mỗi thành phần:
- Giao định thấp hơn là -2 15 , hoặc -32,768 .
- phần mặt trên của250,000 − 1, hoặc 32,767 .
Chuyển đổi sang Vector3
Để chuyển đổi một Vector3int16 thành một Vector3 , xây dựng một Vector3 bằng cách truyền đơn mỗi 1> thành phần1> của 4> Datatype.
local vector3int16 = Vector3int16.new(1, 2, 3)local vector3 = Vector3.new(vector3int16.X, vector3int16.Y, vector3int16.Z)print(vector3) --> 1, 2, 3
Làm cho không pass một toàn bộ Vector3int16 đến Vector3.new() , nhưng nhà xây dựng giải thích một 1> Datatype.Vector3int161> như một <
local vector3int16 = Vector3int16.new(1, 2, 3)local vector3 = Vector3.new(vector3int16)print(vector3) --> 0, 0, 0
Các hoạt động toán học
Các biểu tượng toán học sau đây đều đúng cho loại dữ đánh máyVector3int16 này. Đối với tất cả các biểu tượng, hãy lưu ý đến giới hạn liên quan đến các số thập phân đã ký hiệu, được mô tả ở trên.
<tbody><tr><td><code>Datatype.Vector3int16</code><code>+</code><code>Datatype.Vector3int16</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> có các thành phần là tổng của các thành phần riêng lẻ của các biểu tượng.</td></tr><tr><td><code>Datatype.Vector3int16</code><code>-</code><code>Datatype.Vector3int16</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> có các thành phần là sự khác biệt của các thành phần tương ứng của các thành phần.</td></tr><tr><td><code>Datatype.Vector3int16</code><code>\*</code><code>Datatype.Vector3int16</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> có các thành phần là sản phẩm của các thành phần riêng lẻ của các nhà hàng.</td></tr><tr><td><code>Datatype.Vector3int16</code><code>/</code><code>Datatype.Vector3int16</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> whose components are the quotient of the operands' respective components. Kết quả của phân chia được tròn xuống.</td></tr><tr><td><code>Datatype.Vector3int16</code><code>\*</code><code>số</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> whose components are the product of the respective <code>Datatype.Vector3int16</code> components and the number (factor). This operation is commutative.</td></tr><tr><td><code>Datatype.Vector3int16</code><code>/</code><code>số</code></td><td>Sản xuất một <code>Datatype.Vector3int16</code> whose components are the quotient of the respective <code>Datatype.Vector3int16</code> components and the number (divisor). Kết quả của việc chia tròn là tròn về 0.</td></tr></tbody>
Hành động | Mô tả |
---|
Tóm Tắt
Người Tạo
Điều chỉnh lại một new Vector3int16 từ các thành phần x, y và z đã được cung cấp.
Thuộc Tính
The x-坐标 of the Vector3int16 .
Y-坐标 của Datatype.Vector3int16 .
Coordinate z của Vector3int16 .
Phép Toán
Sản xuất một Vector3int16 whose components are the sum of the operands' respective components.
Sản xuất một Vector3int16 whose components are the difference of the operands' respective components.
Sản xuất một Vector3int16 whose components are the product of the operands' respective components.
Sản xuất một Vector3int16 whose components are the quotient of the operands' respective components. The results of the division are rounded down.
Sản xuất một Vector3int16 whose components are the product of the respective Vector3int16 components and the number (factor). This operation is commutative.
Sản xuất một Vector3int16 có các thành phần là tổ hợp của các thành phần Vector3int16 được tính toán và số (divisor). Kết quả của sự chia tròn được tròn trong vòng 0.
Người Tạo
new
Trả lại một new Vector3int16 từ các thành phần x, y và z đã được cho. Các thành phần không là số thập phân được tròn xuống.
Các thành phần phải rơi trong phạm vi [-2 15 , 2 15 ) nếu nằm ngoài phạm vi này, hơn mức trùng lệnh có thể xảy ra. Ví dụ, cung cấp 32,768 (tương đương 2 <
Thuộc Tính
Phép Toán
Sản xuất một Vector3int16 whose components are the sum of the operands' respective components. Be mindful of the limits associates with signed 16-bit integers, described earlier.
Sản xuất một Vector3int16 whose components are the difference of the operands' respective components. Be mindful of the limits associates with signed 16-bit integers, described earlier.
Sản xuất một Vector3int16 whose components are the product of the operands' respective components. Be mindful of the limits associates with signed 16-bit integers, described earlier.
Sản xuất một Vector3int16 whose components are the quotient of the operands' respective components. The results of the division are rounded down. Be mindful of the limits associates with signed 16-bit integers, described earlier.
Sản xuất một Vector3int16 whose components are the product of the respective Vector3int16 components and the number (factor). This operation is commutative. Be mindful of the limits associates with signed 16-bit integers, described earlier.
Sản xuất một Vector3int16 whose components are the quotient of the respective Vector3int16 components and the number (divisor). Kết quả của số phân tách được tròn lên đến zero. Hãy lưu ý về các giới hạn liên quan đến các số 16-bit đã được mô tả