Skip to content

Commit

Permalink
Credits given to Yellowafterlife for trig funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
nhurde committed Mar 11, 2020
1 parent 88d2ac4 commit 28f88de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions semath.cpp
@@ -1,12 +1,12 @@
/*
semath.cpp
This file is part of:
Simple Easy Math Library
https://www.pawbyte.com/opensource
Short Easy Math Library
https://www.pawbyte.com/semath
Copyright (c) 2014-2020 Nathan Hurde, Chase Lee.
Copyright (c) 2014-2020 PawByte LLC.
Copyright (c) 2014-2020 Simple Easy Math Library contributors ( Contributors Page )
Copyright (c) 2014-2020 Short Easy Math Library contributors ( Contributors Page )
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand All @@ -26,8 +26,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-Simple Easy Math Library <https://www.pawbyte.com/opensource>
-Short Easy Math Library <https://www.pawbyte.com/semath>
*/

Expand Down Expand Up @@ -63,6 +62,7 @@ namespace semath
return sin(dAngle *math_radians_multiplier);
}

//Special thanks to YellowAfterLife for help in these calculations
float get_direction( float x1, float y1, float x2, float y2 )
{
float returnVal = atan2(y2-y1,x2-x1) * math_degrees_multiplier;
Expand Down
10 changes: 6 additions & 4 deletions semath.h
Expand Up @@ -2,11 +2,11 @@
semath.h
This file is part of:
Short Easy Math Library
https://www.pawbyte.com/opensource
https://www.pawbyte.com/semath
Copyright (c) 2014-2020 Nathan Hurde, Chase Lee.
Copyright (c) 2014-2020 PawByte LLC.
Copyright (c) 2014-2020 Simple Easy Math Library contributors ( Contributors Page )
Copyright (c) 2014-2020 Short Easy Math Library contributors ( Contributors Page )
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand All @@ -26,8 +26,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-Simple Easy Math Library <https://www.pawbyte.com/opensource>
-Short Easy Math Library <https://www.pawbyte.com/semath>
*/

Expand All @@ -51,6 +50,7 @@ namespace semath
float bound_number(float numbIn,float xMin =0, float xMax = 100);
bool compare_floats(float a,float b);

//Special thanks to YellowAfterLife for help in these calculations
float point_direction(float x1,float y1,float x2,float y2);
float point_distance(float x1, float y1, float x2, float y2);

Expand All @@ -66,10 +66,12 @@ namespace semath
float deg_sin( float dAngle );

//Directional math
//Special thanks to YellowAfterLife for help in these calculations
float get_direction( float x1, float y1, float x2, float y2 );
float get_distance( float x1, float y1, float x2, float y2 );

//Length/Direction Functions
//Special thanks to YellowAfterLife for help in these calculations
float lengthdir_x( float length, float angle);
float lengthdir_y( float length, float angle);
}
Expand Down

0 comments on commit 28f88de

Please sign in to comment.