Differences From Artifact [80f52c4aaf]:
- File lib/math.lua — part of check-in [147592b8e9] at 2020-10-26 03:58:08 on branch trunk — add over-time spellcasting abstraction to enable metamagic and in particular disjunction, add more animations and sound effects, add excavation spell, possibly some others, forget when the last commit was, edit a bunch of magitech to make it subject to the disjunction mechanism (throw up a disjunction aura and waltz right through those force fields bby, wheee), also illumination spells, tweak runeforge and rune frequence to better the balance and also limit player frustration, move some math functions into their own library category, various tweaks and bugfixes, probably other shit i don't remember (user: lexi, size: 583) [annotate] [blame] [check-ins using]
To Artifact [4d5bf7109c]:
- File lib/math.lua — part of check-in [b24c5f49c7] at 2021-07-05 03:07:21 on branch trunk — bug fixes, add spellshatter visuals, maybe finally defuckulate imbuement effect? (user: lexi, size: 471) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 |
local fn = {} fn.vsep = function(vec) -- separate a vector into a direction + magnitude local magnitude = math.max(math.abs(vec.x), math.abs(vec.y), math.abs(vec.z)) local inv = 1 / magnitude return vector.multiply(vec,inv), magnitude end fn.vdcomp = function(dist,v1,v2) -- compare the distance between two points -- (cheaper than calculating distance outright) local d if v2 then d = vector.subtract(v1,v2) else d = v1 |
| < < |
1 2 3 4 5 6 7 8 9 10 11 |
local fn = {}
fn.vsep = function(vec) -- separate a vector into a direction + magnitude
return vec:normalize(), vec:length()
end
fn.vdcomp = function(dist,v1,v2) -- compare the distance between two points
-- (cheaper than calculating distance outright)
local d if v2
then d = vector.subtract(v1,v2)
else d = v1
|