VE Lua Documentation

Press F to search!

float3

Definition


-- @/lua/common/mathlib.lua:49

function vec3(x, y, z)
  if rawequal(y, nil) then
    if rawequal(x, nil) then
      return newLuaVec3xyz(0, 0, 0)
    else
      if rawequal(x.xyz, nil) then
        return newLuaVec3xyz(x.x or x[1], x.y or x[2], x.z or x[3])
      else
        return newLuaVec3xyz(x:xyz())
      end
    end
  else
    return newLuaVec3xyz(x, y, z or 0)
  end
end

Callers

@/lua/common/extensions/ui/imguiUtils.lua
      imgui.PushStyleColor2(imgui.Col_Text, imgui.ImVec4(0.7, 1, 1, 1))
      imgui.Text(string.format('float3(%g,%g,%g)', data.x, data.y, data.z))
      imgui.PopStyleColor()