fixes
This commit is contained in:
3
TODO.md
3
TODO.md
@@ -10,5 +10,4 @@
|
||||
4. Fix integral line
|
||||
5. re-add euler's number (well it works if you use capital e like `E^x`)
|
||||
6. allow constants in min/max integral input
|
||||
7. sliding values for functions (like a user-interactable slider that adjusts a variable in the function, like desmos)
|
||||
8. fix log2()
|
||||
7. sliding values for functions (like a user-interactable slider that adjusts a variable in the function, like desmos)
|
||||
@@ -51,6 +51,12 @@ pub fn process_func_str(function_in: String) -> String {
|
||||
let mut add_asterisk: bool = false;
|
||||
let prev_chars_len = prev_chars.len();
|
||||
|
||||
let prev_prev_prev_char = if prev_chars_len >= 3 {
|
||||
*prev_chars.get(prev_chars_len - 3).unwrap()
|
||||
} else {
|
||||
' '
|
||||
};
|
||||
|
||||
let prev_prev_char = if prev_chars_len >= 2 {
|
||||
*prev_chars.get(prev_chars_len - 2).unwrap()
|
||||
} else {
|
||||
@@ -63,6 +69,16 @@ pub fn process_func_str(function_in: String) -> String {
|
||||
' '
|
||||
};
|
||||
|
||||
if (prev_prev_prev_char == 'l')
|
||||
&& (prev_prev_char == 'o')
|
||||
&& (prev_char == 'g')
|
||||
&& (NUMBERS.contains(&c))
|
||||
{
|
||||
prev_chars.push(c);
|
||||
output_string += &c.to_string();
|
||||
continue;
|
||||
}
|
||||
|
||||
let c_letters_var = LETTERS.contains(&c) | VALID_VARIABLES.contains(&c);
|
||||
let prev_letters_var = VALID_VARIABLES.contains(&prev_char) | LETTERS.contains(&prev_char);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user