Skip to content

Java library for Physics calculations and conversions

License

Notifications You must be signed in to change notification settings

gabrielmjr/Physic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physic

Physical Calculations on Java

Info

Actual version: 1.0.4-Beta_4

Latest release: 1.0.3-Release

Package:

com.gabrielMJr.twaire.physic
Maven dependency:

Step 1: Add the Jitpack repository to your ~/.m2/settings.xml file

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

Step 2: Add the Physic dependency to your maven project directory

<dependency>
  <groupId>com.github.gabrielmjr</groupId>
  <artifactId>Physic</artifactId>
  <version>[Tag]</version>
</dependency>
Gradle dependency

Step1: Add the Jitpack IO repository url into your top level build.gradle file

allprojects {
    repositories {
    ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2: Add the Physic dependency into dependency in build.gradle app module

dependencies {
    implementation 'com.github.gabrielmjr:Physic:Tag'
}

Documentation

Public classes

Main class

Name: Physic

Class path:

com.gabrielMJr.twaire.physic.Physic
Constants

name: static int GET_RESULT value: 0

name: static int GET_STEP value: 1

When use calculation methods with more than 2 doubles parameters, those constants are used to choose between just get result of the passed value our get for each step calculations in a String.

This feature do calculations of Uniform Rectilinear Motion such as:

  • Constant speed of a travelled distance by an object;
  • Time spent during a trajectory;
  • Travelled distance by an object;

Uniformly Varied Movement:

  • Acceleration of an object;
  • Speed ​​variation during a trip;
  • Time spent during a trajectory;
  • Travelled distance by an object;

This feature do calculations of Volumetric Flow such as:

  • Area of ​​a flow tube;
  • Speed ​​of flow of a stream;
  • Ray of a flow tube;
  • Time interval of a flow;
  • Flow rate to be occupied by a fluid flow in a determined time;
  • Volume ocuped.

This feature converts bellow units of area from one to another:

  • Square_kilometer - "km²";
  • Square_hectometer - "hm²";
  • Square_decameter - "dam²"
  • Square_meter - "m²";
  • Square_decimeter - "dm²";
  • Square_centimeter - "cm²";
  • Square_millimeter - "mm²".

This feature converts bellow units of distance from one to another:

  • Kilometer - "km";
  • Hectometer - "hm";
  • Decameter - "dam"
  • Meter - "m";
  • Decimeter - "dm";
  • Centimeter - "cm";
  • Millimeter - "mm".

This feature converts bellow units of speed from one to another:

  • Kilometer_per_second - "km/s";
  • Hectometer_per_second - "hm/s";
  • Decameter_per_second - "dam/s"
  • Meter_per_second - "m/s";
  • Decimeter_per_second - "dm/s";
  • Centimeter_per_second - "cm/s";
  • Millimeter_per_second - "mm/s".

  • Kilometer_per_minute - "km/min";
  • Hectometer_per_minute - "hm/min";
  • Decameter_per_minute - "dam/min"
  • Meter_per_minute - "m/min";
  • Decimeter_per_minute - "dm/min";
  • Centimeter_per_minute - "cm/min";
  • Millimeter_per_minute - "mm/min".

  • Kilometer_per_hour - "km/h";
  • Hectometer_ler_hour - "hm/h";
  • Decameter_per_hour - "dam/h"
  • Meter_per_hour - "m/h";
  • Decimeter_per_hour - "dm/h";
  • Centimeter_per_hour - "cm/h";
  • Millimeter_per_hour - "mm/h".

This feature converts bellow units of area from one to another:

  • Cube_kilometer - "km³";
  • Cube_hectometer - "hm³";
  • Cube_decameter - "dam³"
  • Cube_meter - "m³";
  • Cube_decimeter - "dm³";
  • Cube_centimeter - "cm³";
  • Cube_millimeter - "mm³".

License

```Copyright 2022 Gabriel MJr```.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.