mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-12 17:40:52 +01:00
Use KalkNum's to_string() function in to_scientific_notation()
This commit is contained in:
parent
121aafa118
commit
4c92062117
@ -54,7 +54,7 @@ impl KalkNum {
|
|||||||
|
|
||||||
impl KalkNum {
|
impl KalkNum {
|
||||||
pub fn to_scientific_notation(&self) -> ScientificNotation {
|
pub fn to_scientific_notation(&self) -> ScientificNotation {
|
||||||
let value_string = self.value.to_string();
|
let value_string = self.to_string();
|
||||||
let trimmed = if value_string.contains(".") {
|
let trimmed = if value_string.contains(".") {
|
||||||
value_string.trim_end_matches("0")
|
value_string.trim_end_matches("0")
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@paddim8/kalk-component",
|
"name": "@paddim8/kalk-component",
|
||||||
"version": "1.0.15",
|
"version": "1.0.16",
|
||||||
"description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.",
|
"description": "A Svelte component for kalk, a calculator that supports user-defined functions and variables.",
|
||||||
"svelte": "src/main.ts",
|
"svelte": "src/main.ts",
|
||||||
"main": "public/build/bundle.js",
|
"main": "public/build/bundle.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user