Lua
C++
Edit

dVec3

This table describes a three-dimensional vector with double float precision.

Members

Constructors

Methods

Example

-- Create a new dVec3 object
local vec = dVec3()

-- Set values for the vector
vec.x = 1.0
vec.y = 2.0
vec.z = 3.0

-- Calculate the length of the vector
local length = vec:Length()

-- Normalize the vector
vec:Normalize()

-- Calculate the dot product of two vectors
local dotProduct = vec:Dot(anotherVec)

-- Reflect the vector
vec:Reflect()
Copyright © 2006-2025 Leadwerks Software.
All rights reserved.
Leadwerks 4 Documentation