ColdIV / math-tool

math-tool - a school project
2 stars 0 forks source link

Geometry #44

Closed ColdIV closed 4 years ago

ColdIV commented 4 years ago

Hope I wasn't too tired when making this... Test file

I made it so that you will have to use identify() on the string first, to see if it's a function or an object.

If it's a function you can call "parseParameters(string)" which will return a std::vector <Object*> of all parameters so that you can call the function yourself with the correct parameters.

If it's an object you can call "parseObject(string)" and you will get the full map of objects (std::unordered_map <std::string, Object*>), as we discussed earlier.

I noticed that the intersection function doesn't work for circle, that has been added to the issue #19

This PR resolves: #31

ColdIV commented 4 years ago

I would approve it, but we should talk about a few things first so that we're on the same page:

  • I would suggest that we try to accept case insensitive input
  • We assume the user will enter function and object names in english.. given our user, I think this is unfortunately unlikely. So maybe we should change the names here to german. What do you think?

OK to case insensitive! You are probably right with the language, I guess I will add the german names to the vectors as well, so we support both?

ColdIV commented 4 years ago

New test file