angmom_galaxy: Computing the angular momentum of the particles.

View source: R/RcppExports.R

angmom_galaxyR Documentation

Computing the angular momentum of the particles.

Description

The purpose of this function is to compute the angular momentum vector.

Usage

angmom_galaxy(part_data)

Arguments

part_data

The particles from which you would like to calculate the angular momentum vector, J.

Value

The numeric vector describing the magnitudes of each component of the angular momentum.

Examples

  galaxy_data = data.frame("ID"=1:100, "x"=stats::rnorm(100),
                           "y"=stats::rnorm(100), "z"=stats::rnorm(100),
                           "vx"=stats::rnorm(100), "vy"=stats::rnorm(100),
                           "vz"=stats::rnorm(100), "Mass"=rep(1,100))
  J = angmom_galaxy(galaxy_data)

kateharborne/SimSpin documentation built on April 28, 2024, 2 p.m.