Only Calculation In Radian In Math Class?
Jan 27, 2010I use Math.Tan(str) for example (str = 35)
I become 0.47... But how can I calculte it in Deg., and Grad., to?
I use Math.Tan(str) for example (str = 35)
I become 0.47... But how can I calculte it in Deg., and Grad., to?
I am trying to perform a simple multiplication in vb.
Below is my code:
Dim minus As Integer
Dim minusPrice As Integer
Dim totalPrice As Integer
[Code].....
This is a math calculation which is using factorial.
[Code]...
how to get the mantissa and exponent from a double in VB.net? I know I can do a string parse and some conversion to ints but I wondered if anyone had a mathematical equivalent formula that would allow me to do this?
View 1 RepliesI have a program that scans an image and converts gems to specific numbers. Look at the picture below:So i have a table with numbers. Number 1 is for yellow gem, 2 for blue, etc...
Like:
A B C D E
1 | 1 2 3 4 5
2 | 3 5 2 4 1
[code]....
I want to calculate a step, to get 3 equal numbers (gems) horizontally or vertically. For example, in this table if i swap E2 with D2, D2 will be 1, and D2,D3,D4 creates a valid step, because it's all 1. I'm using VB.NET 2010.My table is 8x8 size, it's just an example above.At now i'm just have the values in multiple variables (A1=1, A2=3, so on..)
Is there some interface I can implement to allow basic comparisons and math to happen as it would an integer?
For example, let's say I have the following class:
Public Class Something
Public SomeBigNumber as UInt64
End Class
I would like to do something like this:
Dim SomethingA, SomethingB, SomethingC as New Something
....
If (SomethingA-SomethingB) > SomethingC Then
'Do stuff
End If
I was hoping to be able to implement some interface (if that is even the right term for it) that would return the UInt64 contained in the class for comparison and math, if possible.
I have a module with generic constants, subs and functions.I would like to be able to use the module in multiple projects in one solution.I also want it to work like the class System.Math, where you do not need to declare and instance of the class before you can reference it.[code]I want to be able to call ClassLibrary1.MyGenerics.Half() just like I can call System.Math.Abs()
View 10 Replieswell i am having a couple of issues with this particular homework problem and this is my first programming class so there is probably quite a few mistakes well the homework problem is to take three double values entered by a user and display the largest and smallest using math.max and math.min and display the smallest and largest so i thought i could use a listbox and take the values that went to the listbox and assign variables to each so i can try to use each variable in the math.max and min but im not making it to far and i actually might be way off
[Code]...
- how to convert degree to radian
-how to use a function sqrt
-how to use a funtion pow
-how to use a function sinus
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
How to write a program to transfrom DDMM.SS (2218.3118 DDMM.SSSS) to Radian mode, which 2218.3118 is export from the GPS reciever.
dd.mm.ss -> dd.mm -> Rad
22'18'31.18" = 22.3086' = 0.38936Rad
2218.3118 (DDMM.SSSS) to 22'18'31.18" (DD.MM.SS) to 22'3087' (DD.MM) to 0.38936 (Rad)
Is there a way to "Import" a static class in C# such as System.Math? I have included a comparison.[code]...
View 3 RepliesFor greater accuracy I should use a Decimal instead of a Double ( so I've been told ). Why then have Microsoft chosen to use DOUBLE for most of the functions that return a floating point value in the Math Class?
[Code]....
I need to store a calculation to use later and obtain a new calculation
[Code]...
I,m developing a debt calculation program 'my problem is when i have to calculate the months to pay back the debt it comes to 28.04 and i have to get it to 29 my code looks like this:
[Code]...
How can I round 4.39 to 5 in VB.NET? I tried:
Math.Round(4.39, 0)
But it displays 4.
I've been having a problem with Math.Log in a function I'm trying to write. When working with variables, it always returns 0. Here's the line I'm trying to run:
Quote:
mb = txtMb.Text
k = txtK.Text
t = txtT.Text
[Code].....
I am trying to use Math.round. now my math.round (2.5) converting it to 2. O want to convert it to 3.
View 6 RepliesI am trying to do math (-, +, *, etc) based on what a user selects from a combo box. The combo has the operators (-, +, *, /) in its items list. when the user selects one of them, I want to use that operator with the two numbers the user also provides from two text boxes.
dim intNumOne as integer
dim intNumTwo as integer
dim intAnswer as integer
[Code]....
'I don't think I want to concatenate here. but this is what I would like to happen (use the operator based on the users selection from the combo and the two numbers from the text boxes. I know I could write a select case or If statement but is there a way to do what I'm trying to do without Select Case or If? I tried to make theOperator a 'char' type variable but that didn't work either.
Is there any way to parse a string in vb.net (like, built in methods), that can do math like Eval can? For example, 3+(7/3.5) as a string would return 2.
I am not asking for you to code this for me, I just want to know if there is a built in way to do this, if there is not I will code it myself.
I can wager that it would not be able to parse stuff like Sin(90) on its own, and I understand that would need to be replaced by Math.Sin(90).
I have tried following coding to get highest value.EX: If I type 4.341111111111, It should get the value 4.35. If I type 9.132222, It should be 9.14 not 9.13.[code]
View 9 RepliesI am building a tool to figure out final value fees. This is the math i have to try to code
$1,000.01 or more 8.75% of the initial $50.00, plus 4.0% of the next $50.01 - $1,000.00, plus 2.0% of the remaining final sale price balance ($1,000.01 - final sale price)
I'm using .Net 3.51 SP1. I've been having problems with .Net's inability to add single numbers, could anyone throw some light on this.
[Code]...
I am trying to create a small application which does mathematical calculations using dates and times. Specifically, to determine the period of time between two specific dates and times.
View 2 RepliesI have a strange result coming from some big math & have no clue as to why I'm getting a different answer from vb.net vs python.Here are the quick snippets & results:
VB.NET
Dim MSB As UInt32 = 3067297518
Dim LSB As UInt32 = 1439785590
[code]......
I've a problem using simple logarithm function Log in some ButtonClick Event. Log is underlined with next warning:System.Diagnostics.Log is not accessible in this context because it is Friend.
Have I missed something or this happens because of the Express version of Visual Basic?
1. The lens equation for a camera is 1/f=1/di+1/de , where f is the focal length of the lens, is the distance between the lens and the film, and is the distance between the lens and the object. For a certain camera, an object that is 18 cm from the lens is in focus when the lens is 9 cm from the film. What is the focal length of the lens?
View 1 RepliesI have to use a round method that follows this behavior:
7.00 -> round -> 7
7.50 -> round -> 7
7.51 -> round -> 8
I tried to use Math.Round, but it works a little bit different.
[Code]...
How can I implement my rounding logic?
How to get numbers from a text box then use them in a math operation.
View 4 RepliesSimilar in concept to Math.Abs() - I'm looking for a function that when given a positive integer will return the same integer. If given a negative, will return zero.
So:
f(3) = 3
f(0) = 0
f(-3) = 0
Yes, this is simple enough to write on my own but I'm wondering if the .NET Math class already has this built in or if the same can be achieved by cleverly chaining a few Math.* calls?