Skip to content

Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.

1.0 KB
Raw Blame
package com.example.text;

import java.util.List;
import java.util.Map;

/** The Rust port of `Nums`, generated by rust-anything: the same static methods. */
public final class Nums {
    private Nums() {}

    /** The Rust port of `com.example.text.Nums.gcd(long a, long b)` (`src/main/java/com/example/text/Nums.java:7`). */
    @SuppressWarnings("unchecked")
    public static long gcd(long a, long b) {
        return rustanything.TextRsNative.call_gcd(a, b);
    }

    /** The Rust port of `com.example.text.Nums.mean(double[] values)` (`src/main/java/com/example/text/Nums.java:18`). */
    @SuppressWarnings("unchecked")
    public static double mean(double[] values) {
        return rustanything.TextRsNative.call_mean(values);
    }

    /** The Rust port of `com.example.text.Nums.pages(int total, int perPage)` (`src/main/java/com/example/text/Nums.java:29`). */
    @SuppressWarnings("unchecked")
    public static int pages(int total, int perPage) {
        return rustanything.TextRsNative.call_pages(total, perPage);
    }
}