Zephyr Scientific Library (zscilib)
momentum.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020 Kevin Townsend (KTOWN)
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
22 #ifndef ZEPHYR_INCLUDE_ZSL_MOMENTUM_H_
23 #define ZEPHYR_INCLUDE_ZSL_MOMENTUM_H_
24 
25 #include <zsl/zsl.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
43 
56 
70  zsl_real_t *p);
71 
89  zsl_real_t m2, zsl_real_t vi2, zsl_real_t *vf2);
90 
107  zsl_real_t vi2, zsl_real_t *vf);
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* ZEPHYR_INCLUDE_ZSL_MOMENTUM_H_ */
114  /* End of momentum group */
zsl_phy_mom_change
int zsl_phy_mom_change(zsl_real_t m, zsl_real_t vi, zsl_real_t vf, zsl_real_t *p)
Calculates the gain or loss in momentum of an object based on its mass (m) and its initial (vi) and f...
zsl_phy_mom_inelas
int zsl_phy_mom_inelas(zsl_real_t m1, zsl_real_t vi1, zsl_real_t m2, zsl_real_t vi2, zsl_real_t *vf)
Calculates the final velocity of the merged object after a perfect inelastic collision between two ob...
zsl_phy_mom_elas
int zsl_phy_mom_elas(zsl_real_t m1, zsl_real_t vi1, zsl_real_t vf1, zsl_real_t m2, zsl_real_t vi2, zsl_real_t *vf2)
Calculates the final velocity of an object after an elastic collision with another object given the f...
zsl.h
API header file for zscilib.
zsl_phy_mom_imp
int zsl_phy_mom_imp(zsl_real_t f, zsl_real_t time, zsl_real_t *imp)
Calculates the impulse given by a constant force acting during a certain period of time.
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_phy_mom_mom
int zsl_phy_mom_mom(zsl_real_t m, zsl_real_t v, zsl_real_t *p)
Calculates the linear momentum in kilograms and meters per second of an object based on its mass (m) ...