Mathematics functions - Leo-Corporation/LeoCorpLibrary GitHub Wiki
Trigonometry functions
To uses these functios and features, do not forget to put this line of code on top of your code file:
C#
using LeoCorpLibrary;VB
Imports LeoCorpLibraryThere is multiple functions availables in this part of LeoCorpLibrary.
This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The Sum() method enables you to do a sum of double numbers.
It's in:
LeoCorpLibrary.Maths.Sum()You need to specify the numbers which you wanna get the sum of, in the argument section of the method.
Note: You can specify negative numbers.
Here's an example of usage:
C#
double numberSum = Maths.Sum(0, 2, 5, 6, 4);VB
Dim numberSum As Double = Maths.Sum(0, 2, 5, 6, 4)This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetBiggestNumber() allows you to get the biggest number among double numbers that are specified. Returns a doublevalue.
It's in:
LeoCorpLibrary.Maths.GetBiggestNumber()Note: You can use negative numbers
Here's an example of usage:
C#
double biggestNumber = Maths.GetBiggestNumber(0, 2, 3, 4, 5, 9, 8, 1);VB
Dim biggestNumber As Double = Maths.GetBiggestNumber(0, 2, 3, 4, 5, 9, 8, 1)This function is available in version 1.3.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetLowestNumber() method allows you to get the lowest number among double numbers that are specified. Returns a double value.
It's in:
LeoCorpLibrary.Maths.GetLowestNumber()Note: You can use negative numbers.
Here's an example of usage:
C#
double lowestNumber = Maths.GetLowestNumber(0, 2, -1, 2.32);VB
Dim lowestNumber As Double = Maths.GetLowestNumber(0, 2, -1, 2.32)This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The RadiansToDegrees() method allows you to convert radians to degrees. Returns a double value.
It's in:
LeoCorpLibrary.Maths.RadiansToDegrees()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radians | Radians to convert | 1.5 |
Here's an example of usage:
C#
double degrees = Maths.RadiansToDegrees(1.57079633);
// Expected result: 90°VB
Dim degrees As Double = Maths.RadiansToDegrees(1.57079633)
' Expected result: 90°This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The DegreesToRadians() method allows you to convert degrees to radians. Returns a double value.
It's in:
LeoCorpLibrary.Maths.DegreesToRadians()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | degrees | Degrees to convert | 60 |
Here's an example of usage:
C#
double degrees = Maths.DegreesToRadians(90);
// Expected result: 1.57079633VB
Dim degrees As Double = Maths.DegreesToRadians(90)
' Expected result: 1.57079633This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetArea() method allows you to get the area of circle. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Circle.GetArea()This method has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Circle's radius | 15.12 |
Here's an example of usage:
C#
double circleArea = Maths.Circle.GetCircleArea(12.458);VB
Dim circleArea As Double = Maths.Circle.GetCircleArea(12.458)This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetPerimeter() allows you to get the perimeter of a circle. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Circle.GetPerimeter()This method has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Circle's radius | 14.1 |
Here's an example of usage:
C#
double circlePerimeter = Maths.Circle.GetPerimeter(11.2);VB
Dim circlePerimeter As Double = Maths.Circle.GetPerimeter(11.2)This function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetDiagonal() method allows you to get a rectangle's diagonal.
It returns a double value.
It's in:
LeoCorpLibrary.Maths.Rectangle.GetDiagonal()This method has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | width | Rectangle's width/base | 4.12 |
| double | length | Rectangle's length | 8.5 |
Here's an example of usage:
C#
double diagonal = Maths.Rectangle.GetDiagonal(4.12, 8.5); // Get diagonalVB
Dim diagonal As Double = Maths.Rectangle.GetDiagonal(4.12, 8.5) ' Get diagonalThis function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetArea() method allows you to get the area of a triangle. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Triangle.GetArea()This method has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | height | Triangle's height | 5.48 |
| double | width | Triangle's width/base | 4.12 |
Here's an example of usage:
C#
double triangleArea = Maths.Triangle.GetArea(5.48, 4.12);VB
Dim triangleArea As Double = Maths.Triangle.GetArea(5.48, 4.12)This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetPerimeter() method allows you to get the perimeter of a triangle. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Triangle.GetPerimeter()This method has three arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side1 | Triangle's side | 5.48 |
| double | side2 | Triangle's side | 4.12 |
| double | side3 | Triangle's side | 6 |
Here's an example of usage:
C#
double trianglePerimeter = Maths.Triangle.GetPerimeter(5.48, 4.12, 6);VB
Dim trianglePerimeter As Double = Maths.Triangle.GetPerimeter(5.48, 4.12, 6)This function is available in version 1.3 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The IsBuildable() method allows you to know if the specified dimensions can build a triangle. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Triangle.IsBuildable()This method has three arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side1 | Triangle's side | 4.5 |
| double | side2 | Triangle's side | 9.1 |
| double | side3 | Triangle's side | 12.45 |
Here's an example of usage:
C#
bool isBuildable = Maths.Triangle.IsBuildable(4.5, 9.1, 12.45);VB
Dim isBuildable As Bool = Maths.Triangle.IsBuildable(4.5, 9.1, 12.45)This function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetHypotenuse() method allows you to get a triangle's hypotenuse from the two other sides. (Pythagore) It returns a double value.
It's in:
LeoCorpLibrary.Maths.Triangle.GetHypotenuse()This method has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side1 | Triangle's side | 4.5 |
| double | side2 | Triangle's side | 6.1 |
Here's an example of usage:
C#
double hypotenuse = Maths.Triangle.GetHypotenuse(4.5, 6.1); // Get the hypotenuseVB
Dim hypotenuse As Double = Maths.Triangle.GetHypotenuse(4.5, 6.1) ' Get the hypotenuseThis function is available in version 1.8 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetVolume() method allows you to get the volume of a cube.
It's in:
LeoCorpLibrary.Maths.Cube.GetVolume()This method has two variation:
Variante 1
GetVolume(double side, double height) {...}Here's the arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side | Cube's side | 7.1 |
| double | height | Cube's height | 3.8 |
Variante 2
GetVolume(double side) {...}Here's the arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side | Cube's side | 8 |
Here's an example of usage:
C#
// In the case of a rectangular prism
double volume = Maths.Cube.GetVolume(12, 14);
// In the case of a cube
double volumeCube = Maths.Cube.GetVolume(12);VB
' In the case of a rectangular prism
Dim volume As Double = Maths.Cube.GetVolume(12, 14)
' In the case of a cube
Dim volumeCube As Double = Maths.Cube.GetVolume(12)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetEdge() method enables you to get the edge of a cube. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Cube.GetEdge()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | area | Area of the cube | 41.5 |
Here's an example of usage:
C#
double areaBase = Maths.Cube.GetEdge(31);VB
Dim areaBase As Double = Maths.Cube.GetEdge(31)This function is available in version 1.8 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetVolume() method enables you to get the volume of a cylinder. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Cylinder.GetVolume()It has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Cylinder's radius | 4.5 |
| double | height | Cylinder's height | 7 |
Here's an example of usage:
C#
// Get the volume of a cylinder
double volume = Maths.Cylinder.GetVolume(13, 5);VB
' Get the volume of a cylinder
Dim volume As Double = Maths.Cylinder.GetVolume(13, 5)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetHeight() method enables you to get the height of a cylinder. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Cylinder.GetHeight()It has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Cylinder's radius | 4.5 |
| double | area | Cylinder's area | 21 |
Here's an example of usage:
C#
double height = Maths.Cylinder.GetHeight(5, 21);VB
Dim height As Double = Maths.Cylinder.GetHeight(5, 21)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetBaseArea() method allows you to get the area of the base of a cylinder. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Cylinder.GetBaseArea()It has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Cylinder's radius | 12 |
Here's an example of usage:
C#
double baseArea = Maths.Cylinder.GetBaseArea(10);VB
Dim baseArea As Double = Maths.Cylinder.GetBaseArea(10)This function is available in version 1.8 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetVolume() method allows you to get the volume of a pyramid. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Pyramid.GetVolume()It has three arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | length | Lenght of the pyramid | 4.5 |
| double | width | Width of the pyramid | 7 |
| double | height | Height of the pyramid | 8.9 |
Here's an example of usage:
C#
// Get the volume of a pyramid
double volume = Maths.Pyramid.GetVolume(13, 5, 15);VB
' Get the volume of a pyramid
Dim volume As Double = Maths.Pyramid.GetVolume(13, 5, 15)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetHeight() method allows you to get the height of a pyramid. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Pyramid.GetHeight()It has three arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | length | Lenght of the pyramid | 4.5 |
| double | width | Width of the pyramid | 7 |
| double | volume | Volume de la pyramide | 8.9 |
Here's an example of usage:
C#
double height = Maths.Pyramid.GetHeight(10, 10, 100).VB
Dim height As Double = Maths.Pyramid.GetHeight(10, 10, 100)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetLenghtBase() allows you to get the length of the base of a pyramid. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Pyramid.GetLenghtBase()It has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | areaBase | Base's area | 9.9 |
| double | width | Width | 12 |
Here's an example of usage:
C#
double lengthBase = Maths.Pyramid.GetLenghtBase(100, 10);VB
Dim lengthBase As Double = Maths.Pyramid.GetLenghtBase(100, 10)This function is available in version 1.8.1 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetWidthBase() allows you to get the width of the base of a pyramid. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Pyramid.GetWidthBase()It has two arguments:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | areaBase | Base's area | 6.1 |
| double | length | Lenght | 15 |
Here's an example of usage:
C#
double widthBase = Maths.Pyramid.GetWidthBase(100, 10);VB
Dim widthBase As Double = Maths.Pyramid.GetWidthBase(100, 10)This function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetArea() method allows you to get the area of an hexagon from the length of it's side. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Hexagon.GetArea()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side | Lenght of the hexagon's side | 8 |
Here's an example of usage:
C#
double hexagonArea = Maths.Hexagon.GetArea(8); // Get the areaVB
Dim hexagonArea As Double = Maths.Hexagon.GetArea(8) ' Get the areaThis function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetPerimeter() method allows you to get the perimeter of a hexagon.
It returns a double value.
It's in:
LeoCorpLibrary.Maths.Hexagon.GetPerimeter()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side | Lenght of the hexagon's side | 7.2 |
Here's an example of usage:
C#
double hexagonPerimeter = Maths.Hexagon.GetPerimeter(7.2); // Get perimeterVB
Dim hexagonPerimeter As Double = Maths.Hexagon.GetPerimeter(7.2) ' Get perimeterThis function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetArea() method allows you to get the area of a diamond. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Diamond.GetArea()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | diag1 | Lenght of the diamond's diagonal | 4.5 |
| double | diag2 | Lenght of the diamond's diagonal | 7.5 |
Here's an example of usage:
C#
double diamondArea = Maths.Diamond.GetArea(4.5, 7.5); // Get areaVB
Dim diamondArea As Double = Maths.Diamond.GetArea(4.5, 7.5) ' Get areaThis function is available in version 3.2 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetPerimeter() method allows you to get the area of a diamond. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Diamond.GetPerimeter()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | side | Lenght of the diamond's side | 8 |
Here's an example of usage:
C#
double diamondPerimeter = Maths.Diamond.GetPerimeter(8); // Get perimeterVB
Dim diamondPerimeter As Double = Maths.Diamond.GetPerimeter(8) ' Get perimeterThis function is available in version 3.8 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetArea() method allows you to get the area of a sphere from its radius. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Sphere.GetArea()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Radius of the sphere | 10 |
Here's an example of usage:
C#
double area = Maths.Sphere.GetArea(10);
// Expected output:
// 1256.6370614359173VB
Dim area As Double = Maths.Sphere.GetArea(10)
' Expected output:
' 1256.6370614359173This function is available in version 3.8 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetVolume() method allows you to get the volume of a sphere from its radius. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Sphere.GetVolume()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | radius | Radius of the sphere | 10 |
Here's an example of usage:
C#
double volume = Maths.Sphere.GetVolume(10);
// Expected output:
// 4188.790204786391VB
Dim volume As Double = Maths.Sphere.GetVolume(10)
' Expected output:
' 4188.790204786391
This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleOpposedSideFromHypotenuse() allows you to get a triangle's opposed side from an angle, and its hypotenuse. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleOpposedSideFromHypotenuse()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.2 |
| double | hypotenuse | The hypotenuse length value | 12 |
Here's an example of usage:

C#
double opposedSide = Maths.Trigonometry.GetTriangleOpposedSideFromHypotenuse(1.05, 10);
// Expected result: 8.66
// Actual result: 8.67423225594017VB
Dim opposedSide As Double = Maths.Trigonometry.GetTriangleOpposedSideFromHypotenuse(1.05, 10)
' Expected result: 8.66
' Actual result: 8.67423225594017This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleOpposedSideFromAdjacent() method allows you to get a triangle's opposed side from an angle, and its adjacent side. It returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleOpposedSideFromAdjacent()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.02 |
| double | adjacent | The adjacent side length value | 5 |
Here's an example of usage:

C#
double opposedSide = Maths.Trigonometry.GetTriangleOpposedSideFromAdjacent(1.05, 5);
// Expected result: 8.66
// Actual result: 8.716576549915851VB
Dim opposedSide As Double = Maths.Trigonometry.GetTriangleOpposedSideFromAdjacent(1.05, 5)
' Expected result: 8.66
' Actual result: 8.716576549915851This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleAdjacentSideFromHypotenuse() method allows you to get a triangle's adjacent side from an angle, and its hypotenuse. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleAdjacentSideFromHypotenuse()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.02 |
| double | hypotenuse | The hypotenuse side length value | 5 |
Here's an example of usage:

C#
double adjacentSide = Maths.Trigonometry.GetTriangleAdjacentSideFromHypotenuse(1.05, 10);
// Expected result: 5
// Actual result: 4.97571047891727VB
Dim opposedSide As Double = Maths.Trigonometry.GetTriangleAdjacentSideFromHypotenuse(1.05, 10)
' Expected result: 5
' Actual result: 4.97571047891727This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleAdjacentSideFromOpposedSide() method allows you to get a triangle's adjacent side from an angle, and its opposed side. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleAdjacentSideFromOpposedSide()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.2 |
| double | opposed | The opposed side length value | 8.6 |
Here's an example of usage:

C#
double adjacentSide = Maths.Trigonometry.GetTriangleAdjacentSideFromOpposedSide(1.05, 8.66);
// Expected result: 5
// Actual result: 4.967546576576329VB
Dim adjacentSide As Double = Maths.Trigonometry.GetTriangleAdjacentSideFromOpposedSide(1.05, 8.66)
' Expected result: 5
' Actual result: 4.967546576576329This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleHypotenuseFromOpposedSide() method allows you to get a triangle's hypotenuse from an angle, and its opposed side. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleHypotenuseFromOpposedSide()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.2 |
| double | opposed | The opposed side length value | 8.6 |
Here's an example of usage:

C#
double hypotenuse = Maths.Trigonometry.GetTriangleHypotenuseFromOpposedSide(1.05, 8.66);
// Expected result: 10
// Actual result: 9.98359248920223VB
Dim hypotenuse As Double = Maths.Trigonometry.GetTriangleHypotenuseFromOpposedSide(1.05, 8.66)
' Expected result: 10
' Actual result: 9.98359248920223This function is available in version 3.5 and higher
Compatibility
| Framework | LeoCorpLibrary | LeoCorpLibrary.Core |
|---|---|---|
| .NET 5 | â | â |
| .NET Core 3.1 | â | â |
| .NET Framework 4.7.2 | â | â |
| .NET Framework 4.5 | â | â |
The GetTriangleHypotenuseFromAdjacentSide() method allows you to get a triangle's hypotenuse from an angle, and its adjacent side. Returns a double value.
It's in:
LeoCorpLibrary.Maths.Trigonometry.GetTriangleHypotenuseFromAdjacentSide()It has one argument:
| Value | Argument | Description | Example |
|---|---|---|---|
| double | angle | The angle value (in radians) | 1.2 |
| double | adjacent | The adjacent side length value | 8.6 |
Here's an example of usage:

C#
double hypotenuse = Maths.Trigonometry.GetTriangleHypotenuseFromAdjacentSide(1.05, 5);
// Expected result: 10
// Actual result: 10.04881618652381VB
Dim hypotenuse As Double = Maths.Trigonometry.GetTriangleHypotenuseFromAdjacentSide(1.05, 5)
' Expected result: 10
' Actual result: 10.04881618652381