Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.fmod

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static float fmod(float x, float y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

float The remainder of x/y.

Description

Returns the floating point remainder of x/y.


Declaration

public static float2 fmod(float2 x, float2 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

float2 The componentwise remainder of x/y.

Description

Returns the componentwise floating point remainder of x/y.


Declaration

public static float3 fmod(float3 x, float3 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

float3 The componentwise remainder of x/y.

Description

Returns the componentwise floating point remainder of x/y.


Declaration

public static float4 fmod(float4 x, float4 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

float4 The componentwise remainder of x/y.

Description

Returns the componentwise floating point remainder of x/y.


Declaration

public static double fmod(double x, double y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

double The remainder of x/y.

Description

Returns the double precision floating point remainder of x/y.


Declaration

public static double2 fmod(double2 x, double2 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

double2 The componentwise remainder of x/y.

Description

Returns the componentwise double precision floating point remainder of x/y.


Declaration

public static double3 fmod(double3 x, double3 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

double3 The componentwise remainder of x/y.

Description

Returns the componentwise double precision floating point remainder of x/y.


Declaration

public static double4 fmod(double4 x, double4 y);

Parameters

Parameter Description
x The dividend in x/y.
y The divisor in x/y.

Returns

double4 The componentwise remainder of x/y.

Description

Returns the componentwise double precision floating point remainder of x/y.