#Breadboard normalize function for vectors

20 messages · Page 1 of 1 (latest)

astral tide
#

Aka shorthand for

(A / A.magnitude)

with a sanity check for if A has no magnitude. Would save me a lot of effort when I need to get the normalized direction of something, which would be

(A-B) / (A-B).magnitude

lavish tide
#

I agree with this
I have wanted this many times

dawn nymph
#

v.direction

#

I'd prefer if it was v.dir, and .magnitude was shortened to .mag

#

v.dir,v.mag

#

if v.mag = 0, output (0,0,0)

lavish tide
jagged hearth
#

no I think he's suggesting a name for it

dawn nymph
#

just a name suggestion

lavish tide
#

Oh, thank you!

#

Yeah!

#

v.direction or v.normalize would both work

normalize is what it's called in Lua iirc

dawn nymph
#

a^1 is so short and nice and simple

sweet wagon
#

damn, they instantly added it 💀 .normalized

jagged hearth
#

very nice

fleet abyss
#

praise ze devs ^^

hazy wasp
#

anyway good addition SIPPP

astral tide
#

Amazing