Code Monkey home page Code Monkey logo

mini-vector-calculator's Introduction

Mini Vector Calculator

This program can do simple Vector Calculation!

Also My First Coding Project! Start as group and further develop on my own!

📍 Related Project

Website Vector Calculator (Developed from this repo.)

✨ Program's Features

Vector Calculation

  • Add Vectors

  • Multiply Vector with scalar and vector

  • Dot Product, Cross Product

  • Project a vector on another

  • Find area of parrallelogram under two vectors

Extra Feature that help visualizing

  • Import Vector Data from and Export to Files

  • Set Number Precision (Number of digits after decimal point)

Very Good Memory Management

There is almost no memory leak in this program from testing so far.

  • Tested using valgrind, however, some very small leaks are possible in rare case.

Multilingual

  • Support 3 Languages: English, Thai and Japanese

Note: Thai and Japanese Version is no longer supported in Windows, to use it please compile from previous version. (4.1 Recommended)

🏃‍♂️ How to Run Program

Compile COMPILE.c and have the assistant take care for you!

For Manual/Direct Compilation, Here is info!

🔢 Sample Vector Data to start with

I've already put some sample vector data you can play with!

These are generated using numpy.

🖥️ Compatibility

Support both Windows and UNIX OS.

Compiler : C99 or above (C17 in gcc 9.3.0 Recommend (the one I use))

Note : Compile with -lm if you are on Linux!

⏳ Credits

Initial Development : Version 1

Developed as a group of 5, presenting to T.Wichai as Mini-Project.

Subject : 「การเขียนโปรแกรม 1 (ง30221)」 Triam Udom Suksa School (2020/1)

* Supervisor・Mentor・Core Programming : @Leomotors

* Support Programmer : Others in Group

* Present : Every person in the group except Mentor (@Leomotors)

Presented on : 5 Oct 2020

The result of this project is really satisfying! 👍

Further Development : Version 2

Developing alone with help from @Teproanyx, including his Safe Input Module. Big Thanks to him! 😊

Also thank you to stackoverflow.

Version 3 Development

Developed further more to submit to T.Wichai again as improvement project.

Note : Due to outgoing pandemic, there is no more work group. (For social distancing) So this work will done my me alone.

Subject : 「การเขียนโปรแกรม 2 (ง30222)」 Triam Udom Suksa School (2020/2)

* 制作監督 : @Leomotors

* Helper・Reviewer : @Teproanyx

* Honorable Mention : Stack Overflow

Presented on : 3 March 2021 (Version 3.3)

Gained a lot from this!

Version 4 Development

Developed on my own to make my program fully function!

🙏 Special Thanks

This Project uses Safe Input Module by Teproanyx

🛣️ Program Version History

Changelog of long journey here

mini-vector-calculator's People

Contributors

leomotors avatar teproanyx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

mini-vector-calculator's Issues

Exit

Please add an exit options to the main menu in main.
I don't wanna press Ctrl + c to exit your program everytime, it's annoying.
Sinerely, @Teproanyx

Empty vector slot input

If a user input an invalid vector slot when prompted for one in operations,
if there is no vector stored in the slot, the program bomb itself and quit.
That seems like a good thing, however, it would really suck, if say, someone
is calculating a group of matrix operations, and then they mistype something,
resulting in program termination. This is also a contrast to the rather nice
error handling you have when inputting a matrix and choosing an invalid spot.

Found by @Teproanyx

Fix Memory Leaks

Fix Memory Leaks,

Memory Leaks occur during:
-Deleting all vectors
-Overwriting vector in inputVector and SaveVector function

C/C++ style

Now that Wichai is no longer a factor, will this code still be coded in this weird hybrid style of C and C++? Or will you switch to a C++ style? If you wish to switch to C++ style, I can give you some help. C++ style would entail stuff like cin and cout instead of printf and scanf.

Empty vector slot input

If a user input an invalid vector slot when prompted for one in operations,
if there is no vector stored in the slot, the program bomb itself and quit.
That seems like a good thing, however, it would really suck, if say, someone
is calculating a group of matrix operations, and then they mistype something,
resulting in program termination. This is also a contrast to the rather nice
error handling you have when inputting a matrix and choosing an invalid spot.

Found by @Teproanyx

Fix Ghost Printing

Ghost Printing with wprintf,

Already limited string length in function so there must be something associated to wprintf or setmode library

Hotfixes before Presentation

Bugs:

  • Export don't work on EN,TH Version Prob. Unexpected Behavior
  • In TH,JP Version, Changing Number Precision have high chance to crash the program

Deadline: This Wednesday (3 March) 15:50

Ghost Printing again

After using program for a while (printing all vector 2-3 times)
Unknown cache in memory appear unexpectly.

Bugs are created due to @Teproanyx compiler flags in tasks.json

https://github.com/Leomotors/TUProject501/blob/4f48297e4b4a17f14ef0c1eafa801c8a173751d1/VectorV2.cpp#L79
-Werror=unused-variable
Variable 'w', created to hold...something? However, it is never used.

https://github.com/Leomotors/TUProject501/blob/4f48297e4b4a17f14ef0c1eafa801c8a173751d1/VectorV2.cpp#L239
-Werror=format=
%c expect argument of type 'char*', but got an 'int*'
This can be easily resolved by changing the variable 'choice' from
https://github.com/Leomotors/TUProject501/blob/4f48297e4b4a17f14ef0c1eafa801c8a173751d1/VectorV2.cpp#L233
to a char.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.