Client LuaCsForBarotrauma
DivideComponent.cs
1
using
System.Xml.Linq;
2
3
namespace
Barotrauma.Items.Components
4
{
5
class
DivideComponent
:
ArithmeticComponent
6
{
7
public
DivideComponent
(
Item
item
,
ContentXElement
element)
8
: base(
item
, element)
9
{
10
}
11
12
protected
override
float
Calculate
(
float
signal1,
float
signal2)
13
{
14
if
(MathUtils.NearlyEqual(signal2, 0)) {
return
float
.NaN; }
15
return
signal1 / signal2;
16
}
17
}
18
}
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.Item
Definition:
BarotraumaShared/SharedSource/Items/Item.cs:26
Barotrauma.Items.Components.ArithmeticComponent
Definition:
ArithmeticComponent.cs:9
Barotrauma.Items.Components.DivideComponent
Definition:
DivideComponent.cs:6
Barotrauma.Items.Components.DivideComponent.Calculate
override float Calculate(float signal1, float signal2)
Definition:
DivideComponent.cs:12
Barotrauma.Items.Components.DivideComponent.DivideComponent
DivideComponent(Item item, ContentXElement element)
Definition:
DivideComponent.cs:7
Barotrauma.Items.Components.ItemComponent.item
Item item
Definition:
BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs:36
Barotrauma.Items.Components
Definition:
BarotraumaShared/SharedSource/Items/Components/DockingPort.cs:15
Barotrauma
BarotraumaShared
SharedSource
Items
Components
Signal
DivideComponent.cs
Generated by
1.9.1