Tutorials¶
Welcome to mp-units tutorials! These step-by-step lessons will teach you the library from scratch.
What are Tutorials?¶
Tutorials are learning-oriented lessons that guide you through using mp-units for the first time.
Each tutorial:
- ✅ Assumes no prior knowledge of the library
- ✅ Teaches by doing with interactive examples
- ✅ Builds your confidence progressively
- ✅ Provides immediate hands-on experience
Prerequisites: Basic C++ knowledge and a good mood! 😊
Learning Path¶
1. Quick Start (~30 minutes)¶
Get up and running with the basics:
- Your First Quantities (~10 min) - Create quantities and see them in action
- Simple Math (~10 min) - Perform calculations with quantities
- Building a Calculator (~10 min) - Put it together in a real program
2. Working with Units (~50 minutes)¶
Learn to convert and work with different unit systems:
- Unit Conversions (~15 min) - Convert between compatible units
- Safe and Unsafe Conversions (~15 min) - Handle truncation and forcing conversions
- Extracting Numeric Values (~20 min) - Get numerical values safely
3. Type Safety (~65 minutes)¶
Experience compile-time safety in action:
- Compile-Time Protection (~15 min) - See the compiler catch errors
- Automatic Dimensional Analysis (~15 min) - Automatic unit calculations
- Quantity Specifications (~20 min) - Quantity hierarchies and type-safe interfaces
- Generic Interfaces (~15 min) - Flexible functions with QuantityOf
4. Affine Space (~55 minutes)¶
Understand points vs quantities:
- Points and Quantities (~15 min) - The difference and why it matters
- Point Origins (~15 min) - Working with absolute positions
- Temperature Handling (~10 min) - Absolute vs relative temperatures
- Temperature Applications (~15 min) - Advanced temperature operations
Total time
~200 minutes to complete all tutorials.
What's Next?¶
After completing the tutorials:
- Study: Read the User's Guide for explanation-oriented understanding of concepts
- Practice: Try Workshops with hands-on exercises
- Apply: Browse How-to Guides for task-oriented solutions to specific problems
- Explore: Check Examples for complete applications
- Lookup: Use the Reference for information-oriented technical details
Getting Help¶
- Check the FAQ for common questions
- Visit the GitHub repository to report issues
- Join discussions in GitHub Discussions
Let's begin!