A simple 3D vector library#

v3d is a simple vector library with the common operations.


If you have Open Dylan 2022.1 or later, the program dylan is already installed as part of that release. Create your new project with dylan new application <name>, and edit the file dylan-package.json created. Just add v3d in dependencies

Change this:

"dependencies": [ ],

to this:

"dependencies": [ "v3d" ],

To know more about dylan package manager visit Dylan tool

Quick summary of v3d#

The module v3d exports the following features:

  • <v3>

  • v3d

  • v-x

  • v-y

  • v-z

  • $v3-zero

  • similar

  • squared

  • magnitude

  • cross-product

  • unit?

  • normalize

  • unitize

  • distance


The vectors are read-only. You can’t change the dimensions without creating a new instance. There are only getters methods and no setters.

Library structure and dependencies#

The libraries used by the project are shown with the modules inside. The arrows between the modules are the dependencies.