more diagonal work (unfinished)
This commit is contained in:
@@ -28,6 +28,19 @@ export function vectorIsZero(value) {
|
||||
}
|
||||
|
||||
|
||||
export function vectorEquals(a, b) {
|
||||
if (a === b) return true
|
||||
if (a === null && b !== null || a !== null && b === null) return false
|
||||
// noinspection JSObjectNullOrUndefined
|
||||
if (a.length !== b.length )
|
||||
return false
|
||||
for (let i = 0; i < a.length; i++)
|
||||
if (a[i] !== b[i])
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
export function vectorAdd(a, b) {
|
||||
const result = []
|
||||
const scalarB = b.length === undefined
|
||||
|
||||
Reference in New Issue
Block a user