ug4
vec_util.lua File Reference

Functions

function __ug__TemplateExpressions_add (a, b)
 
function __ug__TemplateExpressions_div (a, b)
 
function __ug__TemplateExpressions_mul (a, b)
 
function __ug__TemplateExpressions_sub (a, b)
 
function set_user_data_overloads2 (name)
 

Function Documentation

◆ __ug__TemplateExpressions_add()

function __ug__TemplateExpressions_add ( ,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / vec_util.lua :99-101

return VecScaleAddClass(1.0, a, 1.0, b)
end
function __ug__TemplateExpressions_add(a, b)

◆ __ug__TemplateExpressions_div()

function __ug__TemplateExpressions_div ( ,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / vec_util.lua :122-124

return VecScaleAddClass(1/b, a)
end
function __ug__TemplateExpressions_div(a, b)

◆ __ug__TemplateExpressions_mul()

function __ug__TemplateExpressions_mul ( ,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / vec_util.lua :106-120

if type(a) == "number" or type(b) == "number" then
return VecScaleAddClass(a, b)
else
local aa = a
local bb = b
if ug_class_group(a) == "VecScaleAddClass" then
aa = a:eval()
end
if ug_class_group(b) == "VecScaleAddClass" then
bb = b:eval()
end
return VecProd(aa, bb)
end
end
if(!(yy_init))
Definition: lexer.cpp:997
int local(bglp_vertex_descriptor p)
Definition: parallel_matrix.h:57
double VecProd(const double &a, const double &b)
returns scal<a, b>
Definition: operations_vec.h:84
function __ug__TemplateExpressions_mul(a, b)

◆ __ug__TemplateExpressions_sub()

function __ug__TemplateExpressions_sub ( ,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / vec_util.lua :102-104

return VecScaleAddClass(1.0, a, -1.0, b)
end
function __ug__TemplateExpressions_sub(a, b)

◆ set_user_data_overloads2()

function set_user_data_overloads2 ( name  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / vec_util.lua :127-143

mt = ug_get_metatable(name)
if mt == nil then return end
mt.__add = _G["__ug__TemplateExpressions_add"]
mt.__sub = _G["__ug__TemplateExpressions_sub"]
mt.__mul = _G["__ug__TemplateExpressions_mul"]
mt.__div = _G["__ug__TemplateExpressions_div"]
end
location name
Definition: checkpoint_util.lua:128
function set_user_data_overloads2(name)