Table of Contents

Struct FixedCurveKey

Namespace
FixedMathSharp
Assembly
FixedMathSharp.dll

Represents a keyframe in a FixedCurve, defining a value at a specific time.

[MemoryPackable(GenerateType.Object)]
public struct FixedCurveKey : IEquatable<FixedCurveKey>, IMemoryPackable<FixedCurveKey>, IMemoryPackFormatterRegister
Implements
IMemoryPackable<FixedCurveKey>
IMemoryPackFormatterRegister
Inherited Members

Remarks

MemoryPack GenerateType: unmanaged

FixedMathSharp.Fixed64 Time
FixedMathSharp.Fixed64 Value
FixedMathSharp.Fixed64 InTangent
FixedMathSharp.Fixed64 OutTangent

Constructors

FixedCurveKey(Fixed64, Fixed64)

Creates a keyframe with a specified time and value.

public FixedCurveKey(Fixed64 time, Fixed64 value)

Parameters

time Fixed64
value Fixed64

FixedCurveKey(Fixed64, Fixed64, Fixed64, Fixed64)

Creates a keyframe with optional tangents for cubic interpolation.

[JsonConstructor]
public FixedCurveKey(Fixed64 time, Fixed64 value, Fixed64 inTangent, Fixed64 outTangent)

Parameters

time Fixed64
value Fixed64
inTangent Fixed64
outTangent Fixed64

FixedCurveKey(int, int)

Creates a keyframe with a specified time and value, using integer parameters for convenience.

public FixedCurveKey(int time, int value)

Parameters

time int
value int

FixedCurveKey(int, int, int, int)

Creates a keyframe with optional tangents for cubic interpolation, using integer parameters for convenience.

public FixedCurveKey(int time, int value, int inTangent, int outTangent)

Parameters

time int
value int
inTangent int
outTangent int

Fields

InTangent

The incoming tangent for cubic interpolation.

[JsonInclude]
[MemoryPackOrder(2)]
public Fixed64 InTangent

Field Value

Fixed64

OutTangent

The outgoing tangent for cubic interpolation.

[JsonInclude]
[MemoryPackOrder(3)]
public Fixed64 OutTangent

Field Value

Fixed64

Time

The time at which this keyframe occurs.

[JsonInclude]
[MemoryPackOrder(0)]
public Fixed64 Time

Field Value

Fixed64

Value

The value of the curve at this keyframe.

[JsonInclude]
[MemoryPackOrder(1)]
public Fixed64 Value

Field Value

Fixed64

Methods

Equals(FixedCurveKey)

public bool Equals(FixedCurveKey other)

Parameters

other FixedCurveKey

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

FromDouble(double, double)

Creates a keyframe with a specified time and value.

public static FixedCurveKey FromDouble(double time, double value)

Parameters

time double
value double

Returns

FixedCurveKey

Remarks

Values are converted through FromDouble(double), so non-finite values throw ArgumentOutOfRangeException and finite values outside the Q32.32 range throw OverflowException.

FromDouble(double, double, double, double)

Creates a keyframe with optional tangents for cubic interpolation.

public static FixedCurveKey FromDouble(double time, double value, double inTangent, double outTangent)

Parameters

time double
value double
inTangent double
outTangent double

Returns

FixedCurveKey

Remarks

Values are converted through FromDouble(double), so non-finite values throw ArgumentOutOfRangeException and finite values outside the Q32.32 range throw OverflowException.

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(FixedCurveKey, FixedCurveKey)

Determines whether two FixedCurveKey instances are equal.

public static bool operator ==(FixedCurveKey left, FixedCurveKey right)

Parameters

left FixedCurveKey
right FixedCurveKey

Returns

bool

operator !=(FixedCurveKey, FixedCurveKey)

Determines whether two FixedCurveKey instances are not equal.

public static bool operator !=(FixedCurveKey left, FixedCurveKey right)

Parameters

left FixedCurveKey
right FixedCurveKey

Returns

bool