Trigonometry Calculator

Back when I was learning Trig, which was 2017 (8th grade), I came across many problems where you use identities to solve problems, and then use a calculator to round of your answer when it has multiple decimals. Whenever I took the calculator, entered the sum, and tried to round off, I would always make silly mistake (being the dunderhead I am), so I wanted to use my programming knowledge in JavaScript, to create a calculator, that would round off the digits for me, along with calculation the trig ratios for any number.

I had made it back then, but it still had a few bugs. I found it again when I was recently browsing through my old JavaScript codes.

I am working on it again, so I though I'll share the link to it here for everyone to see -

Trigonometry Calculator (with inbuilt round off function!)

You can suggest ideas for me to add, and give feedback about it or just discuss any topic of Trigonometry here.

I would also like to see if this can be done with Python, but as I don't know Python, I didn't try it. If someone has found or made the Python code for this, please do share with me.

I know it looks horrible, so I am learning HTML/CSS styling to make it look better, so I will be editing it shortly.

Here is a preview of how it looks(or rather how bad it looks :P) -

Normally how it looks Normally how it looks When values are typed in and a button is clicked When values are typed in and a button is clicked

(Sorry for bad image quality...)

(Also, I know a round off function is kinda lazy, but hey, we're all trying to make life easier, aren't we?)

Note by A Former Brilliant Member
7 months, 3 weeks ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

@Krishna Karthik - That 'oofmation animation' dude needs a brain...this is what he posted -

that it. You what more huh? I don't' care if I have bad grammar, I am very happy for who I am and, how about this, I will take about puberty I am not scared to talk about that. laughs

The douchebag doesn't know we've talked about much worse ;)

lol Did you see his new note? He posted one about puberty, and it got taken down, so he posted another one being butthurt about it lol - oof butthurt

A Former Brilliant Member - 5 months, 4 weeks ago

Log in to reply

@Percy Jackson

I literally can't believe it; I really think either he's lying about his age or he's not right. In the case that he's not right, I think I should just ignore it.

By the way he told me he has Grammarly 🤣🤣🤣. Yup, I know how ridiculous that sounds. If he keeps making spam content, I would consider reporting his profile.

Krishna Karthik - 5 months, 4 weeks ago

Log in to reply

He's probably lying bout his age to show off...I can't believe that dude has Grammarly?!?!?! What a waste...lol

A Former Brilliant Member - 5 months, 4 weeks ago

Log in to reply

I think his name is quite accurate, he's the type of guy you walk past and think "Oof" in your head 🤣

Krishna Karthik - 5 months, 4 weeks ago

Log in to reply

@Krishna Karthik - lol yeah

A Former Brilliant Member - 5 months, 4 weeks ago

Log in to reply

@Aryan Sanghi - Can you Python this? I will share the JavaScript code if you want.

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

I'll try to python it. Don't worry, I don't need JavaScript code. :)

Aryan Sanghi - 7 months, 3 weeks ago

Log in to reply

K, awesome!

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

'an embedded page in this page needs you to put a number between 3-8 in the second output box"

the message wont go away in it and i cant put any numbers to fulfill what it wants me to do

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

Oh, ok I'll edit it, seemingly it didn't get saved when I removed that bug.

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

thanks

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

@Nscs 747 Try it now, it works :)

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member ok will do

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

yea its better now since there is a bigger delay between each message it now gives the user sufficient time to fix it before every tim i pressed ok so i could fix my number it kept spamming itself so thx for fixing it

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

Thanks ;)

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

pretty neat are you also gonna make a full calculator but with this system integrated? also how to do strikethru text and divide sign on computer

also is there any way i can help u guys with this like being a tester or something

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

Thanks. I might make this a full calculator, but that will take time. The Latex for strike-through as far as i remember is \cancel{}, but I a maybe wrong, so check the latex guide of Marton's. What do you mean by you guys? This is a solo project(mostly because people treat JavaScript like a dead language as far as I know). If you mean Aryan Sanghi, then as I mentioned before, I was just interested in whether this could be recreated in Python. You can help me by suggesting ideas and finding bugs if you want to.

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

but what about minecraft java?

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

I also fixed the bug of tangent. Tan 90 will usually get you a large number that goes out of the screen. That is kinda undefined, so I made a condition so that whenever these kind of numbers occur, it will just replace them with text saying 'Undefined'. Though it isn't completely fixed, as the undefined number flashes in and goes out, which still has to be fixed.

A Former Brilliant Member - 7 months, 3 weeks ago

Log in to reply

ok i will test it to see if there is any glitches or bugs is there anything in particular u wanted me to test

NSCS 747 - 7 months, 3 weeks ago

Log in to reply

Great job!

Elijah C - 6 months, 1 week ago

Log in to reply

Thank you!

A Former Brilliant Member - 6 months, 1 week ago

Log in to reply

So. Anything exciting happen while I took a small holiday from Brilliant?

NSCS 747 - 6 months ago

Log in to reply

@Nscs 747 Not much...other than my solutions and upvotes rocketing to 100-200 in the Daily Challenges :)

Log in to reply

@Nscs 747 I'm glad you're back tho :)

Log in to reply

Hey, this looks pretty good for a grade 8er!

Krishna Karthik - 6 months ago

Log in to reply

Thanks bro :)

Log in to reply

Hullo

NSCS 747 - 5 months, 4 weeks ago

Log in to reply

Hey @NSCS 747 do you know that OOFMATION guy?

A Former Brilliant Member - 5 months, 4 weeks ago

Log in to reply

@A Former Brilliant Member @Percy Jackson Actually, I've seen Nathan around Oofmation's posts recently, so I think he knows about Oofmation.

But yeah, Nathan's a pretty nice guy, so I suppose he's more tolerating than others. He is willing to look past the fact that Oofmation is a creationist and quite egotistical.

Krishna Karthik - 5 months, 4 weeks ago

Log in to reply

@Krishna Karthik Yeah

A Former Brilliant Member - 5 months, 4 weeks ago

Log in to reply

@A Former Brilliant Member : )

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 What are you smiling at?

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member

: )

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 lol

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@NSCS 747 Hey bro, how are you doing?

Krishna Karthik - 5 months, 4 weeks ago

Log in to reply

@Krishna Karthik good good how bout u

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 2 months ago...

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member i realised better lat e then never

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 Ahaha thanks for responding nevertheless :)

Krishna Karthik - 3 months, 3 weeks ago

Log in to reply

@Krishna Karthik anything intersting happen while i was offline? i saw srijan pop up in my email notifs

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 lol @NSCS 747 @Krishna Karthik

Nothing much interesting happened...just the rickroll on BM

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member what was bm's reaction

NSCS 747 - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 he posted a funny ryan reynolds gif lol

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@Nscs 747 srijan is dead in my notifs...he's inactive i guess

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member Haha yeah; I haven't seen Srijan around that much either. And I've been a bit inactive too the past few weeks, not gonna lie.

Krishna Karthik - 3 months, 3 weeks ago

Log in to reply

@Krishna Karthik yea i was inactive last few months, just became active in the last week or so

A Former Brilliant Member - 3 months, 3 weeks ago

Log in to reply

@A Former Brilliant Member Last time I was fairly active in brilliant was when I made my N-body simulation.

Krishna Karthik - 3 months, 3 weeks ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...