Skip to content

IMCGKN/Math_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

MATH LIBRARY WRITTEN ENTIRELY IN C++ WITH NO LIBRARIES / TOOLS

This math library consists of:

Vec2, Vec3, and Matrix4x4

Area of circle functions

Trigonometry functions

functions:

floor and ceil

pow2 and pow

max and abs

DOCUMENTATION:

PI = pi value

HALF_PI = half pi, used in cos function.

pow2 is a funtion that returns takes one argument of any numeric data type and returns it powered.

pow is the same but it takes 2 arguments. One is the number that you want to raise it to power of second argument.

max is a function that returns highest number of two numbers.

abs returns an absolute version of argument.

sqrt is a function that returns a double that is used to denote square root or nth roots.

toRadians takes one argument in degrees and converts it to radians.

toRadians takes one argument in radians and converts it to degrees.

factorial In mathematics, the factorial of a non-negative integer a, is the product of all positive integers less than or equal to a.

sin cos tan are all trigonometric functions that take one argument.

floor takes one float argument and returns smallest possible number of this float argument.

ceil takes one float argument and returns biggest possible number of this float argument.

areaOfCircle takes radius and returns area this circle;

radiusOfCircle takes circumference and returns radius this circle;

NOTE: All this classes below uses overload operators.

VEC3:

is a class that contains many functions and 3 floats: x, y, z

You can use this class to add, devide, multiply and subtract two vectors.

You can also assign values of one vector to the other.

VEC2:

is a class that contains many functions and 2 floats: x, y

You can use this class to add, devide, multiply and subtract two vectors.

You can also assign values of one vector to the other.

MATRIX4x4:

is a class used to demonstrate 4x4 MATRIX.

Math is a rectangular array or table of numbers, symbols, or expressions, arranged in rows and columns.

It is used mostly in graphics programming in 3d or 2d.

is a class that contains many functions and 1 array of float: mat You can use this class to add, devide, multiply and subtract two matrices.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages