From b3b349c24c0591f9cb91bfa378973cbed9ce9734 Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 16 Sep 2019 04:06:49 +0100 Subject: [PATCH] --- vector_ops.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vector_ops.mdwn b/vector_ops.mdwn index 2dfda08a8..bdb3c9284 100644 --- a/vector_ops.mdwn +++ b/vector_ops.mdwn @@ -6,10 +6,26 @@ Normally in SV all operations are scalar and independent. In this extension, th ## Vector cross product +Result is the cross product of x and y, i.e., the resulting components are, in order: + + x[1] * y[2] - y[1] * x[2] + x[2] * y[0] - y[2] * x[0] + x[0] * y[1] - y[0] * x[1] + +All the operands must be vectors of 3 components of a floating-point type. + ## Vector dot product ## Vector length +The scalar length of a vector + + sqrt(x[0]^2 + x[1]^2 + ...). + +## Vector distance + +The scalar distance between two vectors. Subtracts one vector from the other and returns length + ## Vector LERP ## Vector SLERP -- 2.30.2