Skip to content

Add Math.clamp #44

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


Please add a function to the Math class that clamps a value between a minimum and a maximum, like so:

a = Math.clamp( a, -1, 1 );

This would behave identically to:

a = Math.max( -1, Math.min( 1, a ) );

Metadata

Metadata

Assignees

Labels

area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions