Files
allwpilib/wpimath/src/generate/GenericNumber.java.jinja
Peter Johnson 263a248119 [wpimath] Use jinja for codegen (#3574)
While not really needed for wpimath, it will make more complex codegen
in the future significantly easier.
2021-09-17 00:10:29 -07:00

32 lines
734 B
Django/Jinja

// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package edu.wpi.first.math.numbers;
import edu.wpi.first.math.Nat;
import edu.wpi.first.math.Num;
/**
* A class representing the number {{ num }}.
*/
public final class N{{ num }} extends Num implements Nat<N{{ num }}> {
private N{{ num }}() {
}
/**
* The integer this class represents.
*
* @return The literal number {{ num }}.
*/
@Override
public int getNum() {
return {{ num }};
}
/**
* The singleton instance of this class.
*/
public static final N{{ num }} instance = new N{{ num }}();
}