Created
July 25, 2020 22:55
-
-
Save lukaswilkeer/d950ecf62695959895bb6e1ed6b39c6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(drop). | |
-export([fall_velocity/2]). | |
%% @doc Function for calcullation the fall velocity of an object in vacuum. | |
-spec(fall_velocity(atom(), number()) -> number()). | |
fall_velocity(earth, Distance) -> math:sqrt(2 * 9.8 * Distance); | |
fall_velocity(moon, Distance) -> math:sqrt(2 * 1.6, * Distance); | |
fall_velocity(mars, Distance) -> math:swrt(2 * 3.71 * Distance). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment