lemon_math 1.2.8 lemon_math: ^1.2.8 copied to clipboard
A utility library for making 2d games
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add lemon_math
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
lemon_math: ^1.2.8
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:lemon_math/constants/degrees_to_radians.dart';
import 'package:lemon_math/constants/pi2.dart';
import 'package:lemon_math/constants/pi_eighth.dart';
import 'package:lemon_math/constants/pi_half.dart';
import 'package:lemon_math/constants/pi_quarter.dart';
import 'package:lemon_math/constants/radians_to_degrees.dart';
import 'package:lemon_math/functions/adjacent.dart';
import 'package:lemon_math/functions/angle.dart';
import 'package:lemon_math/functions/angle_between.dart';
import 'package:lemon_math/functions/clamp.dart';
import 'package:lemon_math/functions/clamp01.dart';
import 'package:lemon_math/functions/clamp_angle.dart';
import 'package:lemon_math/functions/diff.dart';
import 'package:lemon_math/functions/distance_between.dart';
import 'package:lemon_math/functions/give_or_take.dart';
import 'package:lemon_math/functions/hypotenuse.dart';
import 'package:lemon_math/functions/insertion_sort.dart';
import 'package:lemon_math/functions/normalize.dart';
import 'package:lemon_math/functions/opposite.dart';
import 'package:lemon_math/functions/position.dart';
import 'package:lemon_math/functions/random.dart';
import 'package:lemon_math/functions/random_angle.dart';
import 'package:lemon_math/functions/random_between.dart';
import 'package:lemon_math/functions/random_bool.dart';
import 'package:lemon_math/functions/random_int.dart';
import 'package:lemon_math/functions/random_item.dart';
import 'package:lemon_math/functions/sort_vertically.dart';
import 'package:lemon_math/functions/vector2.dart';
import 'package:lemon_math/library.dart';