Click or drag to resize

MathHelperBarycentric Method

Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.

Namespace:  SampSharp.Entities.SAMP
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public static float Barycentric(
	float value1,
	float value2,
	float value3,
	float amount1,
	float amount2
)

Parameters

value1
Type: SystemSingle
The coordinate on one axis of vertex 1 of the defining triangle.
value2
Type: SystemSingle
The coordinate on the same axis of vertex 2 of the defining triangle.
value3
Type: SystemSingle
The coordinate on the same axis of vertex 3 of the defining triangle.
amount1
Type: SystemSingle
The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2.
amount2
Type: SystemSingle
The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3.

Return Value

Type: Single
Cartesian coordinate of the specified point with respect to the axis being used.
See Also