blob: 66f06390c227dde6b4d4dfdea01a1643afee5eb8 [file] [log] [blame]
Austin Schuh812d0d12021-11-04 20:16:48 -07001// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
Maxwell Henderson80bec322024-01-09 15:48:44 -08005// THIS FILE WAS AUTO-GENERATED BY ./wpimath/generate_numbers.py. DO NOT MODIFY
6
Austin Schuh812d0d12021-11-04 20:16:48 -07007package edu.wpi.first.math;
8
Maxwell Henderson80bec322024-01-09 15:48:44 -08009// CHECKSTYLE.OFF: ImportOrder
Austin Schuh812d0d12021-11-04 20:16:48 -070010{% for num in nums %}
11import edu.wpi.first.math.numbers.N{{ num }};
12{%- endfor %}
Maxwell Henderson80bec322024-01-09 15:48:44 -080013// CHECKSTYLE.ON
Austin Schuh812d0d12021-11-04 20:16:48 -070014
15/**
16 * A natural number expressed as a java class.
17 * The counterpart to {@link Num} that should be used as a concrete value.
18 *
19 * @param <T> The {@link Num} this represents.
20 */
Austin Schuh812d0d12021-11-04 20:16:48 -070021public interface Nat<T extends Num> {
22 /**
23 * The number this interface represents.
24 *
25 * @return The number backing this value.
26 */
27 int getNum();
28{% for num in nums %}
Maxwell Henderson80bec322024-01-09 15:48:44 -080029 /**
30 * Returns the Nat instance for {{ num }}.
31 *
32 * @return The Nat instance for {{ num }}.
33 */
Austin Schuh812d0d12021-11-04 20:16:48 -070034 static Nat<N{{ num }}> N{{ num }}() {
35 return N{{ num }}.instance;
36 }
Maxwell Henderson80bec322024-01-09 15:48:44 -080037{% endfor -%}
Austin Schuh812d0d12021-11-04 20:16:48 -070038}