From b4f2128399d5334e646a3e4799f2f84b8ade8295 Mon Sep 17 00:00:00 2001 From: ffrostfall <80861876+ffrostfall@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:38:06 -0400 Subject: [PATCH] Update docs/vector-library.md Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com> --- docs/vector-library.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/vector-library.md b/docs/vector-library.md index e48bf82..5cac6d7 100644 --- a/docs/vector-library.md +++ b/docs/vector-library.md @@ -92,6 +92,13 @@ Vector where `x=1, y=1, z=1, w?=1`. Primitive operators for vectors are already implemented, so this RFC doesn't concern vector arithmetic. +### Component access + +Component access is already supported in the VM using the fields 'x', 'y', 'z', 'X', 'Y' and 'Z' (plus 'w' and 'W' in 4-wide mode). +Note that writes to a single component are not supported as the vector value is immutable. +This RFC doesn't define any changes to this behavior. + + ### Compiler options Currently, there are 2 compiler options relating to vectors, `vectorLib` & `vectorCtor`. This poses an interesting problem: a builtin library would remove the _requirement_ for such compiler options, however these options still need to be supported. The intuitive solution to this is to leave both compiler options working and maintained, but provide the built-in vector library by default, allowing two vector libraries and two vector constructors.