I created my first simple extension (for testing).
I have seen this extension: [Extension] Math Formulas [V3] - #8 by FahadAhmad
Yes, this returns x1, which of course can also be negative. But what about x2,
?
(pq-Formula) and
(not a big deal, I know, but for the first time )
de.BodyMindPower.quadraticEquation.aix (5.6 KB)
UPDATE v2: de.BodyMindPower.quadraticEquation_v2.aix (5.7 KB)
I have simplified the extension following @Vishwas advice:
22 Likes
Mateja
(Mateja)
April 2, 2020, 5:30pm
#2
Good job! Did you use a tutorial to learn the process of developing AIX extensions?
1 Like
Yes, I’ve read a number of such tutorials, but unfortunately I’m not very familiar with Java.
1 Like
But some things are very similar to Swift (Apple).
1 Like
Vishwas
(Vishwas Adiga)
April 2, 2020, 5:42pm
#5
Great first extension!
Have you considered having only one method that returns a List
of both solutions of the equation?
You could do something like:
public YailList Calc(float a, float b, float c) {
float x1 = /*YOUR CODE TO FIND THE FIRST SOLUTION*/;
float x2 = /*YOUR CODE TO FIND THE SECOND SOLUTION*/;
return YailList.makeList(new Object[] {x1, x2});
}
7 Likes
Mateja
(Mateja)
April 2, 2020, 5:44pm
#6
What IDE did you use? Appybuilder?
Yes, I tried, but I didn’t succeed. I will try again later.
Now the champagne is opened first.
Thanks for the tip!
2 Likes
Mateja:
What IDE did you use?
I wrote the Java code with NotePad++ and use an extension template repository and apache-ant-1.10.7.
2 Likes
I updated the extension. Now the values x1, x2 are output in a list.
Thanks @Vishwas
1 Like
Love the extension!
Stay safe and keep Koding…
with Atom or VS Code :)
3 Likes